i18n
Props
Name | Type | Description |
---|---|---|
loadPromise | Promise<void> | Promise of when messages got fetched |
Messages | Record<string, Message > | Contains all strings for the selected locale |
Functions
Name | Parameters | Return Type | Description |
---|---|---|---|
getAvailableLocales | Locale [] | Gets all available locales | |
getDefaultLocale | string | Gets the default locale | |
getLanguages | Language [] | Gets all available languages | |
getLocale | string | Gets the selected locale | |
getLocaleInfo | Language | Gets information on the selected locale | |
setLocale | locale : string | void | Changes locale |
setUpdateRules | rules : ParserRules | void | Sets parser rules |
updateMessagesForExperiment | locale : string callback : (messages: Messages ) => Messages | void | Changes all strings for a specific locale |
Types
Language
Name | Type | Description |
---|---|---|
code | string | Language code |
enabled | boolean | Whether the language is enabled and usable in the app |
enabledAPI | boolean | Whether the language API is enabled |
englishName | string | English name of the language |
name | string | Language name |
postgresLang | string | Character set type |
Locale
Name | Type | Description |
---|---|---|
localizedName | string | Localized name of the locale |
name | string | Locale name |
value | string | Language code |