Skip to main content



      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
Eclipse UserFriend
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
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
Eclipse UserFriend
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
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
Eclipse UserFriend
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/
Previous Topic:Docs for Internationalisation out of date
Next Topic:EMF based RAP Editor
Goto Forum:
  


Current Time: Wed Jul 23 15:49:26 EDT 2025

Powered by FUDForum. Page generated in 0.03751 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top