Add a new custom variable in Mapping.en-US.json, works in Chrome but it doesn't work in IE
I found a strange thing when I add a new custom variable in Mapping.en-US.json, like as
.....
"language-custom-strange": "Custom text",
....
I added the @language-custom-strange in my Desktop.json.js that works in Chrome and Firefox, however it doesn't work in IE11. It shows @language-custom-strange in my web viewer instead of "Custom text".
Is there anyone has same experience?
Thanks,
Yingnan
-
Try reloading your site (from the main Manager site list page) and also clearing your cache in IE.
We have also had issue with IE when you don't specify a locale. Try adding "&locale=en-US" on the end of your URL.0 -
Thank you Peter,
I added "&locale=en-US" on the my URL, that works!
But where is the "&locale=en-US" come from? From server?0 -
The locale you add to your URL is a pointer to the specific set of language files that Essentials will use to populate all text strings within the application. If you look in the library section of your desktop.json.js file, you will see that each module listed has a reference to (by default) the US English set of language files. You can extend support for other languages by adding additional entries in the "locales" section. For example:
{ "id": "Mapping", "uri": "Resources/Compiled/Mapping.js", "locales": [ { "locale": "en-US", "uri": "{ViewerConfigUri}../../../Resources/Locales/Mapping.en-US.json.js" }, { "locale": "en-CA", "uri": "{ViewerConfigUri}../../../Resources/Locales/Mapping.en-US.json.js" }, { "locale": "fr-CA", "uri": "{ViewerConfigUri}../../../Resources/Locales/Mapping.fr-CA.json.js" } ] }I'm not sure why it happens but when using IE browser and you don't specify the locale, it doesn't seem to default to en-US locale properly - Chrome and Firefox work fine. If you are publishing the URL to your viewer on a web page somewhere, just make sure you include the locale parameter and you shouldn't have issues with any of the browsers.
I hope that answers your question.
0 -
Thanks Peter.
Yes, it works if I add en-US locale in the URL.
I hope Geocortex can help us to figure out.
Ying0
Please sign in to leave a comment.
Comments
4 comments