How does localization work with the ArcGIS for JavaScript API?

The API will automatically use the locale of the browser. If you don't want that behavior, you can set your application to a specific locale.

  // set locale before JSAPI is loaded
  dojoConfig = {
    locale: "ja",
    parseOnLoad: true

You can find more information in Internationalization with the Dojo Toolkit.

Support for right-to-left (RTL)

The ArcGIS API for JavaScript provides bidirectional support. To enable right-to-left (RTL), set the dir attribute in the <html> or <body> tag to rtl.

<html dir="rtl">

How to replace a localized text string

The default text strings used by widgets in the ArcGIS API for JavaScript can be modified by setting the values to a new string in your application.

require(["esri/Map", "dojo/i18n!esri/nls/common", "dojo/domReady!"],
  function(Map, bundle) {
      bundle.form.yes = "Yeah!";
      bundle.form.no = "No way!";

Locale support

The ArcGIS API for JavaScript has support for the following locales.

  • Arabic (ar)
  • Bosnian (bs) - Added in version 4.2
  • Simplified Chinese (zh-cn)
  • Traditional Chinese (Hong Kong) (zh-hk)
  • Traditional Chinese (Taiwan) (zh-tw)
  • Croatian (hr) - Added in version 4.1
  • Czech (cs)
  • Danish (da)
  • Dutch (nl)
  • English (en)
  • Estonian (et)
  • Finnish (fi)
  • French (fr)
  • German (de)
  • Greek (el)
  • Hebrew (he)
  • Hindi (hi) - Added in version 4.3
  • Indonesian (id) - Added in version 4.2
  • Italian (it)
  • Japanese (ja)
  • Korean (ko)
  • Latvian (lv)
  • Lithuanian (lt)
  • Norwegian (nb)
  • Polish (pl)
  • Portuguese (Brazil) (pt-br)
  • Portuguese (Portugal) (pt-pt)
  • Romanian (ro)
  • Russian (ru)
  • Serbian (sr) - Added in version 4.1
  • Slovenian (sl) - Added in version 4.6
  • Spanish (es)
  • Swedish (sv)
  • Thai (th)
  • Turkish (tr)
  • Vietnamese (vi)