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:
parent
2b25d6352a
commit
177aef7abc
|
@ -86,7 +86,7 @@ public class MathException extends Exception {
|
||||||
ResourceBundle.getBundle("org.apache.commons.math.MessagesResources", locale);
|
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
|
// the value of the resource is the translated string
|
||||||
return cachedResources.getString(s);
|
return cachedResources.getString(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue