You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2006/11/26 07:17:57 UTC

[jira] Updated: (STR-1485) Locale missing when constructing a MessageFormat in MessageResources

     [ http://issues.apache.org/struts/browse/STR-1485?page=all ]

Paul Benedict updated STR-1485:
-------------------------------

    Bugzilla Id:   (was: 20265)
    Component/s: Core
                     (was: Unknown)
       Assignee:     (was: Struts Developers)

> Locale missing when constructing a MessageFormat in MessageResources
> --------------------------------------------------------------------
>
>                 Key: STR-1485
>                 URL: http://issues.apache.org/struts/browse/STR-1485
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1 RC1
>         Environment: Operating System: All
> Platform: All
>            Reporter: Mike Baroukh
>            Priority: Minor
>             Fix For: Future
>
>
> in method
> org.apache.struts.util.MessageResources.getMessage(Locale locale, String key,
> Object args[]) 
> a MessageFormat is constructed : 
> ...
> format = new MessageFormat(escape(formatString));
> ...
> this line should be replaces with
> format = new MessageFormat(escape(formatString), locale);
> else it use the machine default locale instead of the locale asked for the message.
> So, if a key contain something like
> mykey.format=the date is {0,date,EEEEEEE dd MMMM yyyy}
> the mesage will be internationalized but not the format of the date inside ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira