Skip to main content

i18n

Props

NameTypeDescription
loadPromisePromise<void>Promise of when messages got fetched
MessagesRecord<string, Message>Contains all strings for the selected locale

Functions

NameParametersReturn TypeDescription
getAvailableLocalesLocale[]Gets all available locales
getDefaultLocalestringGets the default locale
getLanguagesLanguage[]Gets all available languages
getLocalestringGets the selected locale
getLocaleInfoLanguageGets information on the selected locale
setLocalelocale: stringvoidChanges locale
setUpdateRulesrules: ParserRulesvoidSets parser rules
updateMessagesForExperimentlocale: string
callback: (messages: Messages) => Messages
voidChanges all strings for a specific locale

Types

Language

NameTypeDescription
codestringLanguage code
enabledbooleanWhether the language is enabled and usable in the app
enabledAPIbooleanWhether the language API is enabled
englishNamestringEnglish name of the language
namestringLanguage name
postgresLangstringCharacter set type

Locale

NameTypeDescription
localizedNamestringLocalized name of the locale
namestringLocale name
valuestringLanguage code