Skip to main content
Options accepted by the function returned from useChangeLanguage.
interface LanguageChangeOptions {
  language: string;
  persist?: "session";
  [key: string]: string | number | boolean | undefined;
}

Properties

language
string
required
The locale code to switch to. Must match one of the locales enabled in your Auth0 tenant. Example: "en", "fr", "es".
persist
"session"
Persistence scope for the language preference. Only "session" is currently supported. Defaults to "session".

Remarks

  • Additional custom fields may be passed alongside language and persist. Custom fields must be prefixed with "ulp-" and accept values of type string, number, boolean, or undefined.