# WebClient and i18n

**URL:** <https://forum.servoy.com/t/webclient-and-i18n/7139>\
**Category:** Classic Servoy\
**Created:** [February 23, 2007, 12:31pm UTC](https://forum.servoy.com/t/webclient-and-i18n/7139 "2007-02-23T12:31:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [February 23, 2007, 12:31pm UTC](https://forum.servoy.com/t/webclient-and-i18n/7139/1 "2007-02-23T12:31:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [February 26, 2007, 10:46am UTC](https://forum.servoy.com/t/webclient-and-i18n/7139/2 "2007-02-26T10:46:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [February 26, 2007, 11:02am UTC](https://forum.servoy.com/t/webclient-and-i18n/7139/3 "2007-02-26T11:02:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [February 26, 2007, 11:08am UTC](https://forum.servoy.com/t/webclient-and-i18n/7139/4 "2007-02-26T11:08:46Z")

</div>

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.
