Home | History | Annotate | Download | only in localespi

Lines Matching defs:Locale

12 import java.util.Locale;
23 public static Locale toICUExtendedLocale(Locale locale) {
24 if (isICUExtendedLocale(locale)) {
25 return locale;
28 String variant = locale.getVariant();
31 // We once convert Locale to ULocale, then update variant
32 // field. We could do this using Locale APIs, but have to
35 ULocale uloc = ULocale.forLocale(locale);
37 return new Locale(locale.getLanguage(), locale.getCountry(), variant);
40 // For preserving JDK Locale's script, we cannot use
41 // the regular Locale constructor.
55 public static boolean isICUExtendedLocale(Locale locale) {
56 String variant = locale.getVariant();
102 private static final Set<Locale> EXCLUDED_LOCALES = new HashSet<Locale>();
104 EXCLUDED_LOCALES.add(Locale.ROOT);
106 EXCLUDED_LOCALES.add(new Locale("de", "GR"));
110 * Checks if the given locale is excluded from locale SPI test
112 public static boolean isExcluded(Locale loc) {
122 * The ICU4J locale spi test cases reports many errors on IBM Java 6. There are two kinds
125 * - When a locale has variant field (for example, sr_RS_Cyrl, de_DE_PREEURO), adding ICU
127 * For these locales, IBM JRE 6 ignores installed Locale providers.
130 * ignores installed ICU locale providers. Probably, "sh" is internally mapped to "sr_RS_Cyrl"
131 * internally before locale look up.
133 * For now, we exclude these problematic locales from locale spi test cases on IBM Java 6.
135 public static boolean isProblematicIBMLocale(Locale loc) {