Skip to content

I18n.addResource method

I18n › addResource

Unofficial

Adds a single resource entry.

Signature:

addResource(lng: string, ns: string, key: string, value: string, options?: AddResourceOptions | undefined): I18n

Parameters:

ParameterTypeDescription
lngstringLanguage code.
nsstringNamespace.
keystringResource key.
valuestringResource value.
options?AddResourceOptions | undefinedAdditional options including keySeparator and silent.

Returns: I18nThe i18n instance.