Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Locale - not working on Chrome/Firefox(Obtaining current Locale for UISession in different browsers)
RAP Locale - not working on Chrome/Firefox [message #1053727] Tue, 07 May 2013 08:04 Go to next message
John Gymer is currently offline John Gymer
Messages: 187
Registered: November 2012
Location: UK
Senior Member
Perhaps someone could help me identify what I'm doing wrong here...
I'm using:

RWT.getUISession().getLocale()


...to get the session's Locale, but it is always coming back with "en_GB" on Chrome and Firefox, whereas IE seems to give the correct current Locale according to the PC's settings e.g. switched to "DE German (Switzerland)" using the Windows Locale switcher, IE gives "de_CH" correctly, but Chrome/Firefox still give "en_GB". This is on Win7.

What is the correct process for changing Locale that RAP would pick up?

I tried using Chrome's chrome://settings/languages page, and the menus/options within Chrome all take on the new language, but RAP doesn't see it.

Thanks, John


---
Just because you can doesn't mean you should
Re: RAP Locale - not working on Chrome/Firefox [message #1057991 is a reply to message #1053727] Fri, 10 May 2013 07:25 Go to previous messageGo to next message
John Gymer is currently offline John Gymer
Messages: 187
Registered: November 2012
Location: UK
Senior Member
Hi Ralf,
Thanks for your 53 replies (!!)
I've not really figured this out yet, as I thought that if I changed the Locale settings on the PC, then restart Chrome, it would just pick up the new Locale, but it doesn't seem to be that simple. I suspect that Chrome is caching something, even remember between instances of the browser. A reboot of the PC after a Locale change works ok, but not just a close of Chrome followed by opening a new one. Anyway, I guess it is not too important since most users don't switch between Locales too often (I was only doing it for testing my support on Internationalisation in my application).
Interestingly, I tried the same thing using Chrome on my Nexus Android device, and this only picked up the Locale change after doing a Force Stop of Chrome. That makes sense to me.
Anyway, no worries - I just thought it may be useful to understand when Locale changes are picked up by the various different browsers.
Cheers, John


---
Just because you can doesn't mean you should
Re: RAP Locale - not working on Chrome/Firefox [message #1058005 is a reply to message #1057991] Fri, 10 May 2013 09:11 Go to previous message
Denis Roy is currently offline Denis Roy
Messages: 307
Registered: October 2004
Location: Ottawa, Ontario, Canada
Senior Member

John Gymer wrote on Fri, 10 May 2013 07:25
Hi Ralf,
Thanks for your 53 replies (!!)


Apologies for that. I accidentally deleted all 53 replies, instead of only 52. I was able to capture Ralph's original message:

Hi John,

RAP reads the locale from the HTTP Header "Accept-Language" of the first
request. If you change the browser's locale setting, you need to reload
the application to pick up the change.


HTH, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/


Denis Roy
Eclipse Webmaster -- webmaster@eclipse.org
Previous Topic:WindowBuilder Bug. Control position in Designer View is opposite
Next Topic:[ANN] RAP 2.1 M2 is available
Goto Forum:
  


Current Time: Sat Aug 30 12:28:05 EDT 2014

Powered by FUDForum. Page generated in 0.02188 seconds