myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3593) locale for i18n has some error
Date Wed, 29 Aug 2012 03:43:07 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443784#comment-13443784
] 

Leonardo Uribe commented on MYFACES-3593:
-----------------------------------------

In theory, you should use an EL expression like <f:view locale="#{...}"> and store it
in session scope. Maybe it is a problem in your application. It does not look like a MyFaces
issue. Instead f:loadBundle define them once in your faces-config.xml.
                
> locale for i18n has some error
> ------------------------------
>
>                 Key: MYFACES-3593
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3593
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.8
>         Environment: myface 2.1.8
>            Reporter: Caau Dung Ngok
>
> i click commandLink to change the locale , like flow:
> <f:view>
>     <f:loadBundle var="msg" basename="welcome" />
>     <h:outputText value="#{msg['welcome.jsf']}" />
>     <h:commandLink value="Change Locale" action="#{locale.changeLocale}" />
> </view>
>  <f:view>must have,if delete, locale 100% cannot change
> and in my backend the cold like flow:
> if(locale.equals(Locale.ENGLISH))
> 		{
> 			locale = Locale.SIMPLIFIED_CHINESE;
> 			FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
> 		}else if(locale.equals(Locale.SIMPLIFIED_CHINESE)){
> 			locale = Locale.ENGLISH;
> 			FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
> 		}
> page will have some error,
> if local is en,it is really show cn_ZH value
> if local is cn_ZH,it is show en value.
> at end,i can not find the same error in Mojarra.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message