Skip to content

API reference / @localizer/translate / dictionary

Function: dictionary()
experimental

dictionary(id, dictionary): Dictionary<string>

Defined in: fn/dictionary.ts:52

Creates a new dictionary instance using the provided identifier and statically defined dictionary.

Parameters

ParameterTypeDescription
idstringA unique identifier for the dictionary.
dictionarySplitStructure<string, string>A statically defined dictionary containing key-value pairs defining translations for different locales.

Returns

Dictionary<string>

An instance of Dictionary<string> initialized with the provided data.