Skip to content

I18n.changeLanguage method

I18n › changeLanguage

Unofficial

Changes the active language.

Signature:

changeLanguage(lng?: string | undefined, callback?: Callback | undefined): Promise<TFunction>

Parameters:

ParameterTypeDescription
lng?string | undefinedLanguage code.
callback?Callback | undefinedOptional callback.

Returns: Promise<TFunction>A promise resolving to the translation function.