Home
last modified time | relevance | path

Searched refs:ULocale (Results 1 – 25 of 209) sorted by relevance

123456789

/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DLocaleAliasTest.java20 import com.ibm.icu.util.ULocale;
24 private static final ULocale[][] _LOCALES = {
26 {new ULocale("en", "RH"), new ULocale("en", "ZW")},
27 {new ULocale("in"), new ULocale("id")},
28 {new ULocale("in", "ID"), new ULocale("id", "ID")},
29 {new ULocale("iw"), new ULocale("he")},
30 {new ULocale("iw", "IL"), new ULocale("he", "IL")},
31 {new ULocale("ji"), new ULocale("yi")},
33 {new ULocale("en", "BU"), new ULocale("en", "MM")},
34 {new ULocale("en", "DY"), new ULocale("en", "BJ")},
[all …]
DULocaleTest.java38 import com.ibm.icu.util.ULocale;
39 import com.ibm.icu.util.ULocale.Builder;
40 import com.ibm.icu.util.ULocale.Category;
41 import com.ibm.icu.util.ULocale.Minimize;
76 public Object create(ULocale req) { in TestCalendar()
112 public Object create(ULocale req) { in TestDateFormat()
125 ULocale locale; in TestNumberFormat()
126 public NFactory(ULocale loc, NumberFormat fmt) { in TestNumberFormat()
131 public NumberFormat createFormat(ULocale loc, int formatType) { in TestNumberFormat()
138 public Object create(ULocale req) { in TestNumberFormat()
[all …]
DLocaleMatcherTest.java17 import com.ibm.icu.util.ULocale;
32 ULocale taiwanChinese = new ULocale("zh_TW"); in testChinese()
33 ULocale chinaChinese = new ULocale("zh_CN"); in testChinese()
67 .add(ULocale.ENGLISH) in testOverrideData()
68 .add(ULocale.FRENCH) in testOverrideData()
69 .add(ULocale.UK) in testOverrideData()
73 assertEquals(ULocale.FRENCH, matcher.getBestMatch(new ULocale("br"))); in testOverrideData()
74 assertEquals(ULocale.ENGLISH, matcher.getBestMatch(new ULocale("es"))); // one way in testOverrideData()
78 …al LocaleMatcher matcher = new LocaleMatcher(LocalePriorityList.add(ULocale.FRENCH).add(ULocale.UK) in testBasics()
79 .add(ULocale.ENGLISH).build()); in testBasics()
[all …]
DDisplayNameTest.java25 import com.ibm.icu.util.ULocale;
36 public String get(ULocale locale, String code, Object context); in get()
59 String[] countries = addUnknown(ULocale.getISOCountries(),2);
60 String[] languages = addUnknown(ULocale.getISOLanguages(),2);
62 String[] scripts = addUnknown(getCodes(new ULocale("en","US",""), "Scripts"),4);
64 String[] currencies = addUnknown(getCodes(new ULocale("en","",""), "Currencies"),3);
68 ULocale[] locales = ULocale.getAvailableLocales(); in TestLocales()
84 checkLocale(ULocale.ENGLISH); in TestEnglish()
88 checkLocale(ULocale.FRENCH); in TestFrench()
91 private void checkLocale(ULocale locale) { in checkLocale()
[all …]
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/util/
DLocaleAliasCollationTest.java13 import com.ibm.icu.util.ULocale;
16 private static final ULocale[][] _LOCALES = {
17 {new ULocale("en", "RH"), new ULocale("en", "ZW")},
18 {new ULocale("in"), new ULocale("id")},
19 {new ULocale("in", "ID"), new ULocale("id", "ID")},
20 {new ULocale("iw"), new ULocale("he")},
21 {new ULocale("iw", "IL"), new ULocale("he", "IL")},
22 {new ULocale("ji"), new ULocale("yi")},
24 {new ULocale("en", "BU"), new ULocale("en", "MM")},
25 {new ULocale("en", "DY"), new ULocale("en", "BJ")},
[all …]
DULocaleCollationTest.java30 import com.ibm.icu.util.ULocale;
40 public Object create(ULocale req) { in TestCollator()
44 public Object register(ULocale loc, Object prototype) { in TestCollator()
59 Object create(ULocale requestedLocale); in create()
75 Object register(ULocale loc, Object prototype); in register()
147 Class[] getLocaleParams = new Class[] { ULocale.Type.class }; in checkObject()
151 ULocale valid = (ULocale) getLocale.invoke(obj, new Object[] { in checkObject()
152 ULocale.VALID_LOCALE }); in checkObject()
153 ULocale actual = (ULocale) getLocale.invoke(obj, new Object[] { in checkObject()
154 ULocale.ACTUAL_LOCALE }); in checkObject()
[all …]
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/collator/
DCollationServiceTest.java23 import com.ibm.icu.util.ULocale;
32 Collator frcol = Collator.getInstance(ULocale.FRANCE); in TestRegister()
33 Collator uscol = Collator.getInstance(ULocale.US); in TestRegister()
36 Object key = Collator.registerInstance(frcol, ULocale.US); in TestRegister()
37 Collator ncol = Collator.getInstance(ULocale.US); in TestRegister()
43 Collator test = Collator.getInstance(ULocale.GERMANY); // CollatorFactory.handleCreate in TestRegister()
44 if (!test.getLocale(ULocale.VALID_LOCALE).equals(ULocale.GERMAN)) { in TestRegister()
45 errln("Collation from Germany is really " + test.getLocale(ULocale.VALID_LOCALE)); in TestRegister()
51 ncol = Collator.getInstance(ULocale.US); in TestRegister()
57 ULocale fu_FU = new ULocale("fu_FU_FOO"); in TestRegister()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DBreakIterator.java18 import com.ibm.icu.util.ULocale;
570 return getWordInstance(ULocale.getDefault()); in getWordInstance()
583 return getBreakInstance(ULocale.forLocale(where), KIND_WORD); in getWordInstance()
594 public static BreakIterator getWordInstance(ULocale where) in getWordInstance()
609 return getLineInstance(ULocale.getDefault()); in getLineInstance()
623 return getBreakInstance(ULocale.forLocale(where), KIND_LINE); in getLineInstance()
635 public static BreakIterator getLineInstance(ULocale where) in getLineInstance()
650 return getCharacterInstance(ULocale.getDefault()); in getCharacterInstance()
664 return getBreakInstance(ULocale.forLocale(where), KIND_CHARACTER); in getCharacterInstance()
676 public static BreakIterator getCharacterInstance(ULocale where) in getCharacterInstance()
[all …]
DLocaleDisplayNames.java21 import com.ibm.icu.util.ULocale;
57 public static LocaleDisplayNames getInstance(ULocale locale) { in getInstance()
70 return getInstance(ULocale.forLocale(locale)); in getInstance()
81 public static LocaleDisplayNames getInstance(ULocale locale, DialectHandling dialectHandling) { in getInstance()
108 public static LocaleDisplayNames getInstance(ULocale locale, DisplayContext... contexts) { in getInstance()
137 return getInstance(ULocale.forLocale(locale), contexts); in getInstance()
147 public abstract ULocale getLocale(); in getLocale()
171 public abstract String localeDisplayName(ULocale locale); in localeDisplayName()
274 …public List<UiListItem> getUiList(Set<ULocale> localeSet, boolean inSelf, Comparator<Object> colla… in getUiList()
288 …public abstract List<UiListItem> getUiListCompareWholeItems(Set<ULocale> localeSet, Comparator<UiL… in getUiListCompareWholeItems()
[all …]
DNumberFormat.java28 import com.ibm.icu.util.ULocale;
29 import com.ibm.icu.util.ULocale.Category;
556 return getInstance(ULocale.getDefault(Category.FORMAT), NUMBERSTYLE); in getInstance()
567 return getInstance(ULocale.forLocale(inLocale), NUMBERSTYLE); in getInstance()
577 public static NumberFormat getInstance(ULocale inLocale) { in getInstance()
588 return getInstance(ULocale.getDefault(Category.FORMAT), style); in getInstance()
598 return getInstance(ULocale.forLocale(inLocale), style); in getInstance()
608 return getInstance(ULocale.getDefault(Category.FORMAT), NUMBERSTYLE); in getNumberInstance()
616 return getInstance(ULocale.forLocale(inLocale), NUMBERSTYLE); in getNumberInstance()
623 public static NumberFormat getNumberInstance(ULocale inLocale) { in getNumberInstance()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DULocale.java112 public final class ULocale implements Serializable, Comparable<ULocale> { class
122 public static final ULocale ENGLISH = new ULocale("en", Locale.ENGLISH);
128 public static final ULocale FRENCH = new ULocale("fr", Locale.FRENCH);
134 public static final ULocale GERMAN = new ULocale("de", Locale.GERMAN);
140 public static final ULocale ITALIAN = new ULocale("it", Locale.ITALIAN);
146 public static final ULocale JAPANESE = new ULocale("ja", Locale.JAPANESE);
152 public static final ULocale KOREAN = new ULocale("ko", Locale.KOREAN);
158 public static final ULocale CHINESE = new ULocale("zh", Locale.CHINESE);
187 public static final ULocale SIMPLIFIED_CHINESE = new ULocale("zh_Hans");
194 public static final ULocale TRADITIONAL_CHINESE = new ULocale("zh_Hant");
[all …]
DLocalePriorityList.java68 public class LocalePriorityList implements Iterable<ULocale> {
75 private final Map<ULocale, Double> languagesAndWeights;
84 public static Builder add(ULocale... languageCode) { in add()
96 public static Builder add(ULocale languageCode, final double weight) { in add()
131 public Double getWeight(ULocale language) { in getWeight()
142 for (final ULocale language : languagesAndWeights.keySet()) { in toString()
159 public Iterator<ULocale> iterator() { in iterator()
195 private LocalePriorityList(final Map<ULocale, Double> languageToWeight) { in LocalePriorityList() argument
208 private final Map<ULocale, Double> languageToWeight
209 = new LinkedHashMap<ULocale, Double>();
[all …]
DLocaleMatcher.java51 private static final ULocale UNKNOWN_LOCALE = new ULocale("und");
62 private final ULocale defaultLanguage;
116 for (final ULocale language : languagePriorityList) { in LocaleMatcher()
119 Iterator<ULocale> it = languagePriorityList.iterator(); in LocaleMatcher()
137 …public double match(ULocale desired, ULocale desiredMax, ULocale supported, ULocale supportedMax) { in match()
150 public ULocale canonicalize(ULocale ulocale) { in canonicalize()
159 return new ULocale( in canonicalize()
175 public ULocale getBestMatch(LocalePriorityList languageList) { in getBestMatch()
177 ULocale bestTableMatch = null; in getBestMatch()
178 for (final ULocale language : languageList) { in getBestMatch()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRangesTest.java20 import com.ibm.icu.util.ULocale;
43 final ULocale locale = new ULocale(test[0]); in TestLocaleData()
60 ULocale ulocale = new ULocale(test[0]); in TestRangePattern()
70 … {0.0, 1.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "0–1 degré Fahrenheit"}, in TestFormatting()
71 … {1.0, 2.0, ULocale.FRANCE, FormatWidth.WIDE, MeasureUnit.FAHRENHEIT, "1–2 degrés Fahrenheit"}, in TestFormatting()
72 … {3.1, 4.25, ULocale.FRANCE, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3,1–4,25 °F"}, in TestFormatting()
73 … {3.1, 4.25, ULocale.ENGLISH, FormatWidth.SHORT, MeasureUnit.FAHRENHEIT, "3.1–4.25°F"}, in TestFormatting()
74 {3.1, 4.25, ULocale.CHINESE, FormatWidth.WIDE, MeasureUnit.INCH, "3.1-4.25英寸"}, in TestFormatting()
75 {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, MeasureUnit.INCH, "0–1 inches"}, in TestFormatting()
77 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.NARROW, Currency.getInstance("EUR"), "€0.00–1.00"}, in TestFormatting()
[all …]
DListFormatterTest.java14 import com.ibm.icu.util.ULocale;
45 checkData(ListFormatter.getInstance(ULocale.ENGLISH), EnglishTestData); in TestEnglish()
46 checkData(ListFormatter.getInstance(ULocale.US), EnglishTestData); in TestEnglish()
64 checkData(ListFormatter.getInstance(ULocale.JAPANESE), JapaneseTestData); in TestJapanese()
91 checkData(ListFormatter.getInstance(ULocale.ROOT), RootTestData); in TestSpecial()
93 checkData(ListFormatter.getInstance(new ULocale("xxx")), EnglishTestData); in TestSpecial()
107 ListFormatter listFormatter = ListFormatter.getInstance(ULocale.ENGLISH); in TestFromList()
116 ListFormatter listFormatter = ListFormatter.getInstance(ULocale.ENGLISH); in TestCreatePatternForNumItems()
124 ListFormatter listFormatter = ListFormatter.getInstance(ULocale.ENGLISH); in TestGetPatternForNumItemsException()
135 … "getLocale", ULocale.ENGLISH, ListFormatter.getInstance(ULocale.ENGLISH).getLocale()); in TestGetLocale()
[all …]
DTimeUnitTest.java22 import com.ibm.icu.util.ULocale;
34 TimeUnitFormat tuf = new TimeUnitFormat(ULocale.ENGLISH, TimeUnitFormat.FULL_NAME); in Test10219FractionalPlurals()
37 NumberFormat nf = NumberFormat.getNumberInstance(ULocale.ENGLISH); in Test10219FractionalPlurals()
46 TimeUnitFormat tuf = new TimeUnitFormat(ULocale.ENGLISH, TimeUnitFormat.FULL_NAME); in Test10219FactionalPluralsParse()
62 new TimeUnitFormat(new ULocale(locales[locIndex]), TimeUnitFormat.FULL_NAME), in TestBasic()
63 new TimeUnitFormat(new ULocale(locales[locIndex]), TimeUnitFormat.ABBREVIATED_NAME), in TestBasic()
97 format.setLocale(new ULocale("pt_BR")); in TestAPI()
99 format = new TimeUnitFormat(new ULocale("de")); in TestAPI()
101 format = new TimeUnitFormat(new ULocale("ja")); in TestAPI()
102 format.setNumberFormat(NumberFormat.getNumberInstance(new ULocale("en"))); in TestAPI()
[all …]
DTimeZoneFormatTest.java40 import com.ibm.icu.util.ULocale;
116 ULocale[] LOCALES = null; in TestTimeZoneRoundTrip()
118 LOCALES = ULocale.getAvailableLocales(); in TestTimeZoneRoundTrip()
120 …LOCALES = new ULocale[] {new ULocale("en"), new ULocale("en_CA"), new ULocale("fr"), new ULocale("… in TestTimeZoneRoundTrip()
328 ULocale[] LOCALES = null; in TestTimeRoundTrip()
336 LOCALES = ULocale.getAvailableLocales(); in TestTimeRoundTrip()
338 LOCALES = new ULocale[] { in TestTimeRoundTrip()
339 …new ULocale("ar_EG"), new ULocale("bg_BG"), new ULocale("ca_ES"), new ULocale("da_DK"), new ULocal… in TestTimeRoundTrip()
340 …new ULocale("de_DE"), new ULocale("el_GR"), new ULocale("en"), new ULocale("en_AU"), new ULocale("… in TestTimeRoundTrip()
341 …new ULocale("en_US"), new ULocale("es"), new ULocale("es_ES"), new ULocale("es_MX"), new ULocale("… in TestTimeRoundTrip()
[all …]
DCompactDecimalFormatTest.java23 import com.ibm.icu.util.ULocale;
230 DecimalFormatSymbols.getInstance(new ULocale("fr")), in checkCore()
247 CompactDecimalFormat.getInstance(ULocale.ENGLISH, CompactStyle.SHORT); in TestDefaultSignificantDigits()
255 getCDFInstance(ULocale.forLanguageTag("sw"), CompactStyle.SHORT); in TestCharacterIterator()
266 checkLocale(ULocale.ENGLISH, CompactStyle.SHORT, EnglishTestData); in TestEnglishShort()
272 ULocale.forLanguageTag("ar"), CompactStyle.LONG); in TestArabicLongStyle()
277 checkLocale(ULocale.forLanguageTag("cs"), CompactStyle.SHORT, CsTestDataShort); in TestCsShort()
281 checkLocale(ULocale.forLanguageTag("sk"), CompactStyle.LONG, SkTestDataLong); in TestSkLong()
285 checkLocale(ULocale.forLanguageTag("sr"), CompactStyle.SHORT, SerbianTestDataShort); in TestSerbianShort()
289 checkLocale(ULocale.forLanguageTag("sr"), CompactStyle.LONG, SerbianTestDataLong); in TestSerbianLong()
[all …]
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/util/
DGlobalizationPreferences.java168 public GlobalizationPreferences setLocales(List<ULocale> inputLocales) { in setLocales()
183 public List<ULocale> getLocales() { in getLocales()
184 List<ULocale> result; in getLocales()
188 result = new ArrayList<ULocale>(); in getLocales()
201 public ULocale getLocale(int index) { in getLocale()
202 List<ULocale> lcls = locales; in getLocale()
222 public GlobalizationPreferences setLocales(ULocale[] uLocales) { in setLocales()
239 public GlobalizationPreferences setLocale(ULocale uLocale) { in setLocale()
243 return setLocales(new ULocale[]{uLocale}); in setLocale()
260 ULocale[] acceptLocales = null; in setLocales()
[all …]
/external/icu/icu4j/main/tests/collate/src/com/ibm/icu/dev/test/format/
DGlobalizationPreferencesTest.java29 import com.ibm.icu.util.ULocale;
41 ULocale defLocale = new ULocale("en_US"); in TestDefault()
42 ULocale defFallbackLocale = new ULocale("en"); in TestDefault()
44 if (!defLocale.equals(ULocale.getDefault())) { in TestDefault()
53 ULocale gpLocale0 = gp.getLocale(0); in TestDefault()
60 ULocale gpLocale1 = gp.getLocale(1); in TestDefault()
67 ULocale gpLocale2 = gp.getLocale(2); in TestDefault()
74 ULocale calLocale = cal.getLocale(ULocale.VALID_LOCALE); in TestDefault()
82 ULocale collLocale = coll.getLocale(ULocale.VALID_LOCALE); in TestDefault()
90 ULocale brkLocale = brk.getLocale(ULocale.VALID_LOCALE); in TestDefault()
[all …]
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/text/
DCollatorServiceShim.java24 import com.ibm.icu.util.ULocale;
28 Collator getInstance(ULocale locale) { in getInstance()
34 ULocale[] actualLoc = new ULocale[1]; in getInstance()
51 Object registerInstance(Collator collator, ULocale locale) { in registerInstance()
68 public Object handleCreate(ULocale loc, int kind, ICUService srvc) { in registerFactory()
73 public String getDisplayName(String id, ULocale displayLocale) { in registerFactory()
74 ULocale objectLocale = new ULocale(id); in registerFactory()
102 ULocale[] getAvailableULocales() { in getAvailableULocales()
103 ULocale[] result; in getAvailableULocales()
113 String getDisplayName(ULocale objectLocale, ULocale displayLocale) { in getDisplayName()
[all …]
DCollator.java26 import com.ibm.icu.util.ULocale;
27 import com.ibm.icu.util.ULocale.Category;
459 return getInstance(ULocale.getDefault()); in getInstance()
506 public Collator createCollator(ULocale loc) { in createCollator()
522 return createCollator(ULocale.forLocale(loc)); in createCollator()
534 … return getDisplayName(ULocale.forLocale(objectLocale), ULocale.forLocale(displayLocale)); in getDisplayName()
545 public String getDisplayName(ULocale objectLocale, ULocale displayLocale) { in getDisplayName()
574 abstract Collator getInstance(ULocale l); in getInstance()
575 abstract Object registerInstance(Collator c, ULocale l); in registerInstance()
579 abstract ULocale[] getAvailableULocales(); in getAvailableULocales()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
DICULocaleService.java14 import com.ibm.icu.util.ULocale;
17 private ULocale fallbackLocale;
38 public Object get(ULocale locale) { in get()
46 public Object get(ULocale locale, int kind) { in get()
54 public Object get(ULocale locale, ULocale[] actualReturn) { in get()
64 public Object get(ULocale locale, int kind, ULocale[] actualReturn) { in get()
77 actualReturn[0] = new ULocale(temp[0]); in get()
87 public Factory registerObject(Object obj, ULocale locale) { in registerObject()
96 public Factory registerObject(Object obj, ULocale locale, boolean visible) { in registerObject()
105 public Factory registerObject(Object obj, ULocale locale, int kind) { in registerObject()
[all …]
DLocaleDisplayNamesImpl.java31 import com.ibm.icu.util.ULocale;
36 private final ULocale locale;
88 public static LocaleDisplayNames getInstance(ULocale locale, DialectHandling dialectHandling) { in getInstance()
94 public static LocaleDisplayNames getInstance(ULocale locale, DisplayContext... contexts) { in getInstance()
100 public LocaleDisplayNamesImpl(ULocale locale, DialectHandling dialectHandling) { in LocaleDisplayNamesImpl()
105 public LocaleDisplayNamesImpl(ULocale locale, DisplayContext... contexts) { in LocaleDisplayNamesImpl()
131 this.locale = ULocale.ROOT.equals(langData.getLocale()) ? regionData.getLocale() : in LocaleDisplayNamesImpl()
210 public ULocale getLocale() { in getLocale()
258 public String localeDisplayName(ULocale locale) { in localeDisplayName()
264 return localeDisplayNameInternal(ULocale.forLocale(locale)); in localeDisplayName()
[all …]
/external/icu/icu4j/main/tests/packaging/src/com/ibm/icu/dev/test/
DTestLocaleNamePackaging.java17 import com.ibm.icu.util.ULocale;
34 private static ULocale[] locales = {
35 ULocale.ROOT, ULocale.US, new ULocale("es_ES"), ULocale.GERMANY,
36 new ULocale("und_TH")
84 for (ULocale displayLocale : locales) { in testRegionDisplayNames()
86 for (ULocale targetLocale : locales) { in testRegionDisplayNames()
149 for (ULocale displayLocale : locales) { in testLanguageDisplayNames()
151 for (ULocale targetLocale : locales) { in testLanguageDisplayNames()
190 ULocale kl = new ULocale("@collation=phonebook"); in testLocaleDisplayNameWithKeywords()
193 for (ULocale displayLocale : locales) { in testLocaleDisplayNameWithKeywords()
[all …]

123456789