Locales in different browsers
Hi.
I'm using some norwegian language files which I've translated. The locales works perfectly in Microsoft Edge, but not in Google Chrome which is the prefered browsers for some of the users. Does anyone know if changing the language-files (mapping-en-EN etc) have any effect on other browsers than Edge? If I use the developmenttools in Chrome and study the console, it states that the languagefile has been loaded correctly. There are no errors on startup.
Regards,
Torbjørn Dalløkken
http://www.dallokken.com/torbjorn
0
-
Can you confirm how you are loading your site? Are you specifying the locale (i.e. adding "&locale=en-EN" to the URL) or just letting it find the default locale? Did you create new Norwegian locale files or just replace the content of the English ones?
We have found that some browsers - including Chrome - do not always load locale strings as expected. Especially if you have added new custom locale strings to the language files (the string name from the locale file shows up prefixed with "@").
Peter.0 -
Hi.
I'm not using the url-parameter, and was just letting the browser find the default locale. When I tried the url-paramter, the locales loads perfectly and the language is norwegian. I used the english ones and replaced the content with translated strings. There are no custom strings in the files.
At least the url-parameters works! :)
Thanks!
Torbjørn0 -
Hi Torbjørn,
Edge and IE pull their locale from the operating system, whereas Chrome's or Firefox's locale is usually configured within the browser itself (chrome://settings/languages for Chrome; about:preferences#content for Firefox). Also, if a user's locale doesn't match the locale(s) you've specified in the viewer's configuration, it will default to the invariant locale, which is "en-US". In your case, the variety of possible locales for Norwegian may create some extra work for you. Assuming you've only got the one locale, your locales array might look something like this:"locales": [ { "locale": "no", "uri": "Resources/Locales/Framework.UI.no-NO.json.js" }, { "locale": "nb", "uri": "Resources/Locales/Framework.UI.no-NO.json.js" }, { "locale": "nn", "uri": "Resources/Locales/Framework.UI.no-NO.json.js" }, { "locale": "no-NO", "uri": "Resources/Locales/Framework.UI.no-NO.json.js" }, { "locale": "nb-NO", "uri": "Resources/Locales/Framework.UI.no-NO.json.js" }, { "locale": "nn-NO", "uri": "Resources/Locales/Framework.UI.no-NO.json.js" } ]You may have to conduct a bit of a survey to see what the reported locale is for your users who see English. You can check to see which locale is configured in the user's browser by having them type navigator.language in the browser's console (that command should work for Chrome, Firefox, IE, and Edge). You can also check the locale that the viewer is running in by opening the log view (Ctrl + Shift + ~ or long-press the banner). The very first line in the log should give the viewer's version and the locale it's running in.
_img_ alt="Viewer log, showing the version and locale on the first line." src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000Cglb&feoid=Body&refid=0EM600000001RUQ" _/_img_0
Please sign in to leave a comment.
Comments
3 comments