registerNamespace Method

Register a new Namespace and return it. If the namespace is already registered, it will be returned.

registerNamespace(name: string): Promise<void>

@note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server, based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await fulfillment of the readPromise Promise property of the returned LocalizationNamespace.

@see Localization in iTwin.js

Parameter Type Description
name string the name of the namespace, which is the base name of the JSON file that contains the localization properties.

Returns - Promise

Defined in

Last Updated: 13 May, 2024