Open Language Switcher

Opens the language switcher in the app.

Description

The openLanguageSwitcher() action opens the native language switcher so the user can change the app language.

Function Signature

await Superfans.actions.openLanguageSwitcher();
ParameterTypeRequiredDescription
NilNilNilThis action does not require any parameter.

Structure of Response

StatusResponse
Success{ "status": "success", "message": "Language switcher opened successfully" }
Unexpected Error{ "status": "error", "errorId": 500, "errorHandle": "unknown-error", "message": "Something unexpected happened" }

Example Usage

await Superfans.actions.openLanguageSwitcher();

Best Practices

  1. Use this only on apps that support multiple languages.
  2. After a language change, re-read live SDK variables instead of caching previous locale-specific text.

Caveats

  1. This action opens the native language switcher; it does not change the language by itself.
  2. Language switching is available only when the app has multiple languages configured.

Did this page help you?