You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/06/26 11:43:05 UTC

DO NOT REPLY [Bug 21104] New: - MessageResources.getMessage does not set the Locale of MessageFormat

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21104>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21104

MessageResources.getMessage does not set the Locale of MessageFormat

           Summary: MessageResources.getMessage does not set the Locale of
                    MessageFormat
           Product: Struts
           Version: 1.1RC2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Utilities
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: amartin@webraska.com


The method 
    public String getMessage(Locale locale, String key, Object args[])

in the org.apache.struts.util.MessageResource class uses a MessageFormat to 
format the message but does not set the locale of it using the setLocale 
method, for instance. 

So, if let's say, you have a message in french and you pass it a date as an 
argument, the date will be formatted with the default locale, which can be 
another one.

This has an impact on the RequestUtils.message method.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org