How does it work?
I’m trying to use i18n.getCurrentLanguage() but it always return ‘it’ even if my browser is set to accept only ‘en’ webpages.
Where does the webclient get the current language? I had a friend of mine from UK test my solution (his system is in english and his browser too) but i18n.getCurrentLanguage() still returned ‘it’.
Any clues?
and in your solution you don’t do:
setLocale() somewhere (fixed to ‘it’) ?
Because we are trying to get the locale from the request. And if that doesn’t work then we fallback to the default servers locale.
No, I don’t specify ‘it’ anywhere it just defaults to it. In the admin pages I have “it,IT,” in the locale.default, I also tried to put “it,IT,en,US” in there but have seen no difference.
For the time being I’m specifying the language passing a parameter to the startup method from the url used to invoke the webclient but it’s only a workaround.
putting that “it,IT,en,US” is wrong because that can’t be parsed to a single locale.
What happens if you do there “en,US” ?
But i will try to test on my hand where the locale is being set to when i change it in the browser on the webclient.