getLocalizedStringWithNamespace Method

Deprecated  in 3.x. 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

@returns The string corresponding to the first key that resolves.

@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.

Defined in

Last Updated: 16 April, 2024