I18N & domains
I18N (Internationalization) is the capacity to handle multiple languages.
KOBI is multi-site and multi-lang, a single site may handle different languages.
When setting up you site you will associate a locale to your domain, exemples :
www.mysite.fr
-> French site with fr-FR localebe.mysite.fr
-> French site with nl-BE localewww.mysite.it
-> Italian site with it-IT locale- …
Thanks to these associations, KOBI know which language matches for a given domain, and may set the Accept-Language
header for component’s requests.
Components
It’s up to your components to handle translations, using the Accept-Language
header. A good practice would be to use property files for your text (one by language).
Static resources
You may need to use different CSS or JS files depending the language, to do so you can set the corresponding locale attribute in your file descriptors :
# component's names affected by this file (with coma separator)
components: io.kobi.i18n.I18nComponent
# which devices are impacted by this file (desktop | mobile | no value for all)
devices: desktop
# which browsers are impacted by this file (legacy | modern | no value for all)
browsers:
# which locales are impacted by this file (fr-FR | it-IT | no value for all)
locales: it-IT
# a script file can be executed with async and defer mode
async: false
defer: true