I have tested to add a URL parameter(?locale=FR-fr) to my applications endpoint, but the application kept using the same (default) english labels. In this Guide (Add i18n support—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers ) it says that after using e.g. http://localhost/test/?locale=FR-fr, and a certain widget has
- "fr": 1, in strings.js
- and fr folder in the same directory, and within that another strings.js file with the translated strings
it will show up in that language.
I have tested with the eSearch widget, but had no success so far.
Is there any other place where I should set something?
Thanks,
Ben
Dear Tim and Robert!
Based on Tim's link I have figured that all I need to do is to set dojoConfig.locale parameter to whatever language I want, and then it is all good!
So for having the option to set the locale from URL parameter, it seems that I have to implement a function in init.js that gets the language code from the URL query string, and sets the dojoConfig.locale value based on this!
Not sure though why is this line in the documentation....
"Reload your application. This time, add a URL parameter, locale=zh-cn, or you change the browser's locale configuration to view the change." (Add i18n support—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers )
But thank you for your help anyways!