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.
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
- ITwinLocalization.ts Line 219
Last Updated: 13 May, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.