EmptyLocalization Class

An empty Localization used if one is not provided to IModelApp. Does not perform localizations (merely returns the key.)

Implements

Methods

Name Description
constructor(): EmptyLocalization    
changeLanguage(): Promise<void> Change the language for translations.  
getEnglishString(_namespace: string, key: string | string[]): string get the English string for a key.  
getLanguageList(): ReadonlyArray Get the list of available languages for translations  
getLocalizedKeys(inputString: string): string Replace all instances of %{key} within a string with the translations of those keys.  
getLocalizedString(key: string | string[]): string Return the translated value of a key.  
getLocalizedStringWithNamespace(_namespace: string, key: string | string[]): string Similar to getLocalizedString but the namespace is a separate param and the key does not include the namespace. Deprecated  
initialize(): Promise<void> This method must be called and awaited before using an instance of Localization.  
registerNamespace(): Promise<void> Register a new Namespace and return a Promise that is fulfilled when the content is loaded.  
unregisterNamespace(): void Unregister a namespace.  

Defined in

Last Updated: 21 November, 2024