Skip to main content


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 12:04 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 279
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 11:25 Go to previous messageGo to next message
John Gymer is currently offline John GymerFriend
Messages: 279
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 13:11 Go to previous message
Denis Roy is currently offline Denis RoyFriend
Messages: 484
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:Docs for Internationalisation out of date
Next Topic:EMF based RAP Editor
Goto Forum:
  


Current Time: Fri Apr 26 00:02:17 GMT 2024

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

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

Back to the top