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.
Parameter | Type | Description |
---|---|---|
namespace | string | the name of the namespace. |
Returns - Promise<void>
Defined in
- core/common/src/Localization.ts Line 97
Last Updated: 16 April, 2024
Found something wrong, missing, or unclear on this page?
Raise an issue in our repo.