struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johan Compagner" <>
Subject build 1217 properties don't load anymore. (BUG)
Date Sun, 17 Dec 2000 21:56:02 GMT
I have 2 propertie files:

So i don't have a at this time.
But my locale is nl_NL or en_US so it should load!!
My default locale is nl_NL.

but the method:
protected String localeKey(Locale locale)
 if (locale == null)  return ("");
 else if (locale.equals(defaultLocale))  return ("");
 else  return (locale.toString());

returns "" for my default locale, this is not the right behaviour.
Please implement it as the ResourceBundle does:

Locale = nl_NL

Then it try's to load: first
if that fails it try's to load: 
if that fails the last 

The current implementations is wrong because:
My machine has a default locale of nl_NL. So when i want to load nl properties now
i must rename the to 
(because localeKey() return "")
But now i deploy my app to a server. Then suddenly the default locale is en_US.
The localeKey() methode return "" so it loads the
But there i have the properties of nl.

So to make it short: Struts should always try to load the current locale (default or not)
and walk through the locale (nl_NL.prop then nl.prop and the "".prop) to try to load the properties.

Johan Compagner

View raw message