Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Language selection for user session
Language selection for user session [message #734375] Fri, 07 October 2011 14:58
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
Hello,

according to documentation RAP is supposed to select one of the request languages of the browser in the prefered order

Web browsers allow users to set their preferred languages and they pass those preferences in an Accept-Language HTTP header with every request. RAP tries to select one of the requested languages in the preferred order and if this is not possible, it uses the default locale as fallback. The default locale can be set by adding the system property user.language to the launch configuration. If no matching properties file can be found, the default one (messages.properties) takes precedence.

It seems that it does not work like this, RAP tries only the first defined language.

In order to be compliant to documentation RWT.getLocale should use ServletRequest.getLocales instead of ServletRequest.getLocale
There should be some configuration to give to RAP to define supported locales (similar to <locale-config/> in JSF), and RWT.getLocale should iterates through the enumeration of locales, to find the first locale also define in the configured list and take this one.

Does it make sense ? or am I missing something ?

Regards,
Arnaud
Previous Topic:Non-serializable attribute org.eclipse.rwt.internal.service.SessionStoreImpl
Next Topic:Language selection for user session
Goto Forum:
  


Current Time: Sat Apr 20 01:14:29 GMT 2024

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

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

Back to the top