You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2014/07/08 22:06:04 UTC

[jira] [Resolved] (WW-3521) I18n issure. If you configed default locale in struts.xml, when you request by other locale, the default locale returned.

     [ https://issues.apache.org/jira/browse/WW-3521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-3521.
-------------------------------

    Resolution: Won't Fix

The signature of {{localeFromString}} is
{{localeFromString(String localeStr, Locale defaultLocale)}} so it isn't possible to switch the parameters.

> I18n issure. If you configed default locale in struts.xml, when you request by other locale, the default locale returned.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3521
>                 URL: https://issues.apache.org/jira/browse/WW-3521
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.1.8, 2.1.8.1, 2.2.1
>         Environment: Windows/Linux, others not test
> SUN JDK 1.6
>            Reporter: Isaac Qu
>             Fix For: 2.3.18
>
>
> If you configed default locale in struts.xml, when you request by other locale, the default locale returned.
> I found the following issues in Dispatcher.java:
> Line 571 and 654: 
>         locale = LocalizedTextUtil.localeFromString(defaultLocale, request.getLocale()); 
> According LocalizedTextUtil.localeFromString method signature,
>  the first parameter is request localeStr, the second parameter is defaultLocale
> should be:
>          locale = LocalizedTextUtil.localeFromString( request.getLocale(), defaultLocale); 



--
This message was sent by Atlassian JIRA
(v6.2#6252)