ITwinLocalization Class
Supplies localizations for iTwin.js
@note this class uses the i18next package.
Implements
Methods
Name | Description | |
---|---|---|
constructor(options?: LocalizationOptions): ITwinLocalization | ||
changeLanguage(language: string): Promise<void> | override the language detected in the browser | |
getLocalizedKeys(line: string): string | Replace all instances of %{key} within a string with the translations of those keys. |
|
getLocalizedString(key: string | string[], options?: TOptionsBase): string | Return the translated value of a key. | |
getNamespacePromise(name: string): undefined | Promise<void> | Get the promise for an already registered Namespace. | |
initialize(namespaces: string[]): Promise<void> | This method must be called and awaited before using an instance of Localization. | |
registerNamespace(name: string): Promise<void> | Register a new Namespace and return it. |
Properties
Name | Type | Description | |
---|---|---|---|
i18next | i18n |
Defined in
- ITwinLocalization.ts Line 33
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.