getLocalizedStringWithNamespace Method

Deprecated  Use getLocalizedString instead; providing either a key with a namespace <namespace>:<key> or

including { ns: <namespace> } in the options.

Similar to getLocalizedString but the namespace is a separate param and the key does not include the namespace.

getLocalizedStringWithNamespace(namespace: string, key: string | string[], options?: TranslationOptions): string

throws Error if no keys resolve to a string.

Parameter Type Description
namespace string the namespace that identifies the particular localization file that contains the property.
key string | string[] the key that matches a property in the JSON localization file.
options TranslationOptions  

Returns - string

The string corresponding to the first key that resolves.

Last Updated: 03 February, 2023