Localization
http://resources.arcgis.com/en/help/flex-viewer/concepts/
Localization of the ArcGIS Viewer for Flex
The ArcGIS Viewer for Flex has built-in support for ten languages. Localization support was added for six languages in version 2.1, and an additional four in version 2.4. To use one of them, see the sample HTML files that set the language to your chosen locale. If you're developing with the source code, see Further Localization.
- Arabic (ar) (added in version 2.4)
- Brazilian Portuguese (pt_BR) (added in version 2.4)
- Chinese (zh_CN)
- English (en_US)
- French (fr_FR)
- German (de_DE)
- Italian (it_IT) (added in version 2.4)
- Japanese (ja_JP)
- Russian (ru_RU) (added in version 2.4)
- Spanish (es_ES)
Specify the locale (compiled viewer)
To use any locale (even English), specify it in the HTML wrapper file (index.html and/or default.htm) by including the two flashvars as below. For an example, View Source for index.html or any of the index_*.html files included as part of the compiled version.
flashvars.localeChain = "en_US";
flashvars.resourceModuleURLs = "assets/locale/en_US.swf";
As of version 2.4, in the compiled viewer, the available locales are separate files and only loaded when needed. This keeps the size of the main files smaller but means you have to specify the locale even for English. There is no longer a default locale. Note that resourceModuleURLs is a new property as of version 2.4 while localeChain was earlier optional. Both are now required.
Localized samples
The viewer comes with localized examples. These include localized configuration files that use the supported locales. Below is a description of the Japanese localized sample for the Flex Viewer.
- index_jp.html
- Alternative to main index.html/default.htm, this file contains the two flashvars mentioned above which makes the localization kick in. It also contains the link to the localized main configuration file.
- apps\ja_JP\config.xml
- Main configuration file that has the names of widget and layers localized using the label property on the <widget> and <layer> tags.
- Contains links to the localized widget configuration files mentioned below.
- apps\ja_JP\BookmarkWidget.xml
- Localized bookmarks.
- apps\ja_JP\CoordinateWidget.xml
- Increased font size for Japanese characters to ensure that they can be read.
Additional languages
Localization into additional languages is also possible, but requires localizing both the API and the Viewer and then compiling the application using the source code. See Further Localization for more information.