allow using locales with different variants

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@507253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2007-02-13 22:06:30 +00:00
parent 2b25d6352a
commit 177aef7abc
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ public class MathException extends Exception {
ResourceBundle.getBundle("org.apache.commons.math.MessagesResources", locale);
}
if (cachedResources.getLocale().equals(locale)) {
if (cachedResources.getLocale().getLanguage().equals(locale.getLanguage())) {
// the value of the resource is the translated string
return cachedResources.getString(s);
}