In the Supported languages section it says : "The language used by the app is determined by your browser's language setting."
Is there a way to control this?
I built the App in Hebrew and I want all the users to see it in Hebrew, no matter what their browser's setting is.
Is that possible?
Deshe.
Solved! Go to Solution.
Majdi,
In version 1.3 you can set the locale using the URL parameter. Just add &locale=ar to your WAB url:
Use URL parameters—Web AppBuilder for ArcGIS | ArcGIS | locale
Hello Robert,
I have built my app using Web AppBuilder 1.2 and did a lot of customization on the theme and even jimu library.
I doubt that if I upgraded my app to WAB 1.3 it will not work properly and everything has to be done again. am I right?
Thanks
Majdi,
If you changes code in the stemapps jimu.js folder than yes you would have to make those updates again if that particular file has changed and the theme you customized would need to be updated as well. I am not sure what is not working for you using the instructions in this thread. I have done it a couple of times and it always works for me. Also even if you do not change any code but you browser is set to another language then once the app is deployed then the browsers language is used (but not when running inside of WAB, that is what this thread takes care of).
Thanks Robert for your reply.
The missing point for me was that the app will not work if i run it inside the WAB (The page keeps loading). So I deployed the app and it works.
Thanks again.
Majdi,
Look at your browsers web console and see what the error is when running in WAB. As I mentioned when I use the code in this post in WAB I do not have any issues.
Comment your line 17 out and it will work. This way you try to set the locale too many times, which results in too long loading. I just confirmed that the "hardcoded only" version works well. I didn't confirm Benedek's version, but this should be slightly faster and cleaner (if hardcoding anything could be "clean").
I have simply added dojoConfig.locale = 'de' to my init.js before this line "resources = resources.concat([...", and then my app is in German! Hope it helps someone, too!
Version 1.3 support ?locale=?? URL parameter.