API reference / @localizer/translate / asyncDictionary
Function: asyncDictionary() experimental
asyncDictionary(
id,dictionary):Promise<Dictionary<string>>
Defined in: fn/dictionary.ts:33
Creates a new dictionary instance using the provided identifier and loadable dictionary.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | A unique identifier for the dictionary. |
dictionary | LoadableDictionary<string, string> | A loadable dictionary containing key-value pairs defining translations for different locales. |
Returns
Promise<Dictionary<string>>
A promise that resolves to a Dictionary<string> instance initialized with the provided data and previously loaded locales.