This content has been marked as final.
Show 2 replies
-
1. Re: LocaleSelector always returns locale
nimo22 Nov 6, 2008 4:39 PM (in response to nimo22)When I use this:
<h:outputText value="displayLanguage: #{facesContext.externalContext.requestLocale.displayLanguage}" />
then my display Language in fact not the language which I have choosen from Seams Locale Selector.
For example:
I select french, then I acceept that
<h:outputText value="displayLanguage: #{facesContext.externalContext.requestLocale.displayLanguage}" />
returns french, but it always returns the browsers-language and not the language of my websystem.
I tried to use
<h:outputText value="#{localeSelector.localeString}" />
but it gives me only the key (fr) instead of french.
Any Ideas?
-
2. Re: LocaleSelector always returns locale
joblini Nov 6, 2008 5:19 PM (in response to nimo22)Try this:
Locale locale = getFacesContext().getViewRoot().getLocale(); System.out.println("locale="+locale);