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
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
Solved! Go to Solution.
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!
Benedek,
I have never been able to get WAB to display in a different language. There is a gentleman in esri France that helped me add the "fr" locale to the widget and he has the widget working in french. It must be more of an OS thing.
Thanks for the response, Robert!
I just would like that my app would be bilingual after deployment, not the WAB itself...
For every widget ESRI provides, there's an nls directory with quite a few languages. So what is the correct way to check out the deployed webapp e.g. in german? URL langcode doesn't seems to work...
Benedek,
This is not an area I am experienced in. But as I mentioned I have contacts in esri France and esri Spain that have WAB working in their local languages. So all you need to do as a developer is to provide the nls strings.js file for the language you are trying to support in your custom widget development and when your app is deployed to that locale those string will show.
Maybe this can help? how can I control which language the WebApp will be?
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!
Benedek,
It looks like they have fixed this for the new 1.3 release coming for AGOL this month and WAB Dev in December.
Thank you Robert, I appreciate your help!