Hide Table of Contents
What's New archive
Localization

The ArcGIS API for JavaScript has support for the following languages. To use one of these simply run your application with the appropriate locale.

  • Arabic (ar)
  • Bosnian (bs) - added in version 3.19
  • Bulgarian (bg) - added in version 3.39
  • Simplified Chinese (zh-cn)
  • Traditional Chinese (Hong Kong) (zh-hk) - added in version 3.14
  • Traditional Chinese (Taiwan) (zh-tw) - added in version 3.14
  • Catalan (ca) - added in version 3.25
  • Croatian (hr) - added in version 3.17
  • Czech (cs)
  • Danish (da)
  • Dutch (nl)
  • English (en)
  • Estonian (et)
  • Finnish (fi)
  • French (fr)
  • German (de)
  • Greek (el) - added in version 3.13
  • Hebrew (he)
  • Hungarian (hu) - added in version 3.25
  • Indonesian (id) - added in version 3.19
  • 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 3.17
  • Slovak (sk) - added in version 3.35
  • Slovenian (sl) - added in version 3.23
  • Spanish (es)
  • Swedish (sv)
  • Thai (th)
  • Turkish (tr) - added in version 3.13
  • Ukrainian (uk) - added in version 3.28
  • Vietnamese (vi)

Note: Some languages like Arabic and Hebrew are written right-to-left (RTL). The map needs to still be left-to-right (LTR) so if the browser language is set to an RTL language add the following attribute to the map div and any other div with API components, e.g. Legend.

<div id="map" dir="ltr"></div>

Dojo determines the locale for the application by retrieving information from the browser. Developers can change the locale using the dojo.config locale setting. Setting the locale using dojoConfig overrides the browsers default locale. Additional locales can be set using extraLocale. In this example, we are overriding the browser's locale and setting the locale to French:

<script type="text/javascript">
  dojoConfig = {
    locale: "fr",
    parseOnLoad: true
  };
</script>

You can define strings for additional locales by creating a new resource bundle file that contains the translated strings. View the Internationalization with the Dojo Toolkit for more details.

After creating the resource bundle for the new locale, load the resource module.

require(["dojo/i18n!myApp/nls/jsapi"], function(myStrings){
  //myStrings will contain the strings from the resource bundle.
});

Modify dijit text

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. For example, in the code snippet below the text for the tooltip that appears when new points are added is modified:

var map;
require(["esri/map", "dojo/i18n!esri/nls/jsapi"],
  function(Map, bundle) {
    bundle.toolbars.draw.addPoint = "Add a new tree to the map";
  }
);

To view all the customizable widget strings view any of the samples in a browser with debugging tools open and type console.dir(esri.bundle) in the console. Debugging tools are available as an integrated part of most modern browsers.

Show Modal