i18n
HDS comes with a built-in internationalization (i18n) system. The <T>
component is used to translate text.
<T key="home.title" />
Scenarios
HDS designs internationalization around the following two scenarios:
- Landing Pages: Translated statically. The language is determined by the URL prefix.
/
is en-US
/fr-FR
is fr-FR
- etc.
- Apps (ex: Console): Translated at runtime. The language is initially determined by the user's browser settings and then saved as a user preference (in Svelte stores and Local Storage).
Language Files
Translated texts are stored in language files.