registerNamespace Method

Register a new Namespace and return a Promise that is fulfilled when the content is loaded. If the namespace is already registered, its Promise will be returned.

registerNamespace(namespace: 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 returned Promise.

@see Localization in iTwin.js

Parameter Type Description
namespace string the name of the namespace.

Returns - Promise<void>

Defined in

Last Updated: 16 April, 2024