Core Options
Initial configuration object of tolgee.
language
Initial language, you need to specify this, unless there is LanguageDetector plugin present.
language: string;
defaultLanguage
Used when LanguageDetector plugin fails.
defaultLanguage: string;
fallbackLanguage
A language(s) that is used when no translation is available for the current one.
fallbackLanguage: string | string[] | Object;
You can also specify which language should fallback to which individually:
fallbackLanguage: {
'en-GB': 'en',
'en-IN': ['en-GB', 'en'],
'es-MX': 'es',
}
All the fallback languages will be fetched at the start of the application.
apiUrl
Tolgee instance url (e.g. https://app.tolgee.io)
apiUrl: string;
apiKey
Project API key (PAK) or Personal Access Token (PAT)
apiKey: string;
projectId
Project id is necessary if you are using PAT
projectId: number | string;
availableLanguages
Specify all available languages. Required for language detection or loading all languages at once (loadMatrix).
It also limits which values can be stored. Is derrived from staticData keys if not provided.
availableLanguages: string[];
ns
Namespaces which should be always fetched
ns: string[];