Language selection for user session [message #734375] |
Fri, 07 October 2011 14:58 |
Arnaud MERGEY 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
|
|
|
Powered by
FUDForum. Page generated in 0.02485 seconds