setText()
Sets the translations for the current locale.
setText(dict: Record<string, string>): void;
Notes
- This method can be used to set the translations for the current locale, if the current provider methods passed to configure() do not include a custom
getText()method. - If a
getText()method is provided by the current provider instance, the translation dictionary is ignored. - The keys of the dictionary can be either the original strings or markers, which are used as
{#marker}in the original string. Markers may not include spaces or{and}characters.
Parameters
- dict — A dictionary of translations, where the keys are the original strings or markers, and the values are the translated strings.
Related
class I18nContext
An object that provides internationalization functionality for the current locale.
