I18N Class

Supplies Internationalization services.

note Internally, this class uses the i18next package.

Methods

Name Description
constructor(nameSpaces?: string | string[], options?: I18NOptions, renderFunction?: Callback): I18N Constructor for I18N.  
getNamespace(name: string): undefined | I18NNamespace Get an already registered Namespace.  
registerNamespace(name: string): I18NNamespace Register a new Namespace and return it.  
translate(key: string | string[], options?: TranslationOptions<object>): string Return the translated value of a key.  
translateKeys(line: string): string Replace all instances of %{key} within a string with the translations of those keys.  

Defined in

Last Updated: 12 June, 2024