You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Caau Dung Ngok (JIRA)" <de...@myfaces.apache.org> on 2012/08/14 09:05:37 UTC
[jira] [Created] (MYFACES-3593) locale for i18n has some error
Caau Dung Ngok created MYFACES-3593:
---------------------------------------
Summary: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MYFACES-3593) locale for i18n has some error
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ 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