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

http://issues.apache.org/bugzilla/show_bug.cgi?id=28850

StringManager does not format using the appropriate locale





------- Additional Comments From [EMAIL PROTECTED]  2004-05-10 15:27 -------
I'm afraid that the revert patch is not totally correct or I'm missing 
something. In the ctor:

        locale = loc;
        String bundleName = packageName + ".LocalStrings";
        try {
            bundle = ResourceBundle.getBundle(bundleName,loc);
        } catch( MissingResourceException ex ) {
            locale = Locale.US;
            bundle= ResourceBundle.getBundle( bundleName, Locale.US);
        }

a getBundle() calls does not implies it will send you the bundle of the same 
locale you requested, but will always fallback to the default one without 
locale identification, ie: LocalStrings.properties which has nothing to do 
with the requested locale (ie, if you ask a chinese bundle it will tell you 
the locale is chinese while the bundle locale is more than certainly english 
and you will end up formatting english messages using chinese locale. 

The try/catch is also a bit irrelevant as the MissingResource will be thrown 
if there are no default bundle (LocalStrings.properties)

Once again, I might be wrong as I went quickly over the code and maybe I 
missed something.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to