Language Switcher widget

The Language Switcher widget is a drop-down menu that switches the app language at run time.

In general settings, you can provide translations for app text content. Any languages that you add in the Manage translations window automatically appear as menu options in the Language Switcher widget.

The Language Switcher widget can update two kinds of app text:

  • App-authored text—Any app text content that you enter manually. This includes, but is not limited to, Text widget text, Button widget text, widget names, page names, and Image widget alt text.
  • Esri-provided text—Built-in app interface text that you cannot customize, such as tool names and tooltips.

A list of supported languages appears in the Manage translations window. Languages are categorized under Full support and Partial support. Full support languages translate app-authored text and Esri-provided text. Partial support languages only translate app-authored text.

Note:

The Language Switcher widget does not affect text from map data, such as text in layer names, feature labels, and pop-up information.

Examples

Use this widget to support app design requirements such as the following:

  • You want to provide a multilingual app.
  • You want users to be able to switch between languages.
  • You want to display the name of the currently selected app language.

Usage notes

To use the Language Switcher widget, you must add at least one language in the Manage translations window in addition to the default language.

To test the Language Switcher widget, you must preview the app in a new window or launch the published app. The widget does not switch languages in the builder environment.

Settings

The Language Switcher widget includes the following settings:

  • Style—Choose one of the following user interface styles:
    • Dropdown—The widget is an icon and a text drop-down button. The button text displays the currently selected language.
    • Icon—The widget is an icon drop-down button.
  • Icon—Change the widget icon. You can choose from the default icons or upload your own icons.

URL parameters

URL parameters add information about an app to the URL. You can use the locale URL parameter followed by a two-letter ISO 639-1 language code to create a URL that opens your app in a specific language.

By default, the locale parameter and the associated language code appear in the app URL when you switch the app language with the Language Switcher widget. You can turn this behavior on or off with the Language setting under Manage URL status.

Experience Builder supports all the same languages that ArcGIS Online supports.

The following is an example URL that switches the language of an Experience Builder app to French:

https://experience.arcgis.com/experience/<AppId>/?locale=fr