Home
last modified time | relevance | path

Searched refs:Locale (Results 1 – 25 of 1596) sorted by relevance

12345678910>>...64

/external/icu/libicu/cts_headers/unicode/
Dlocid.h195 class U_COMMON_API Locale : public UObject {
198 static const Locale &U_EXPORT2 getRoot(void);
200 static const Locale &U_EXPORT2 getEnglish(void);
202 static const Locale &U_EXPORT2 getFrench(void);
204 static const Locale &U_EXPORT2 getGerman(void);
206 static const Locale &U_EXPORT2 getItalian(void);
208 static const Locale &U_EXPORT2 getJapanese(void);
210 static const Locale &U_EXPORT2 getKorean(void);
212 static const Locale &U_EXPORT2 getChinese(void);
214 static const Locale &U_EXPORT2 getSimplifiedChinese(void);
[all …]
Dlocalematcher.h230 inline const Locale *getDesiredLocale() const { return desiredLocale; } in getDesiredLocale()
241 inline const Locale *getSupportedLocale() const { return supportedLocale; } in getSupportedLocale()
276 Locale makeResolvedLocale(UErrorCode &errorCode) const;
279 Result(const Locale *desired, const Locale *supported, in Result()
288 const Locale *desiredLocale;
289 const Locale *supportedLocale;
360 Builder &setSupportedLocales(Locale::Iterator &locales);
418 Builder &addSupportedLocale(const Locale &locale);
442 Builder &setDefaultLocale(const Locale *defaultLocale);
505 Builder &setMaxDistance(const Locale &desired, const Locale &supported);
[all …]
/external/icu/icu4c/source/common/unicode/
Dlocid.h195 class U_COMMON_API Locale : public UObject {
198 static const Locale &U_EXPORT2 getRoot(void);
200 static const Locale &U_EXPORT2 getEnglish(void);
202 static const Locale &U_EXPORT2 getFrench(void);
204 static const Locale &U_EXPORT2 getGerman(void);
206 static const Locale &U_EXPORT2 getItalian(void);
208 static const Locale &U_EXPORT2 getJapanese(void);
210 static const Locale &U_EXPORT2 getKorean(void);
212 static const Locale &U_EXPORT2 getChinese(void);
214 static const Locale &U_EXPORT2 getSimplifiedChinese(void);
[all …]
Dlocalematcher.h230 inline const Locale *getDesiredLocale() const { return desiredLocale; } in getDesiredLocale()
241 inline const Locale *getSupportedLocale() const { return supportedLocale; } in getSupportedLocale()
276 Locale makeResolvedLocale(UErrorCode &errorCode) const;
279 Result(const Locale *desired, const Locale *supported, in Result()
288 const Locale *desiredLocale;
289 const Locale *supportedLocale;
360 Builder &setSupportedLocales(Locale::Iterator &locales);
418 Builder &addSupportedLocale(const Locale &locale);
442 Builder &setDefaultLocale(const Locale *defaultLocale);
505 Builder &setMaxDistance(const Locale &desired, const Locale &supported);
[all …]
/external/libtextclassifier/native/utils/i18n/
Dlocale_test.cc25 Locale locale = Locale::Invalid(); in TEST()
30 Locale locale = Locale::FromBCP47("en-CH"); in TEST()
38 Locale locale = Locale::FromBCP47("zh-CN"); in TEST()
46 Locale locale = Locale::FromBCP47("zh-Hant-TW"); in TEST()
54 Locale locale = Locale::FromBCP47("en"); in TEST()
62 Locale locale = Locale::FromBCP47("zh-Hant"); in TEST()
70 std::vector<Locale> locales = {Locale::FromBCP47("zh-HK"), in TEST()
71 Locale::FromBCP47("en-UK")}; in TEST()
72 std::vector<Locale> supported_locales = {Locale::FromBCP47("en")}; in TEST()
74 EXPECT_TRUE(Locale::IsAnyLocaleSupported(locales, supported_locales, in TEST()
[all …]
Dlocale.cc82 Locale Locale::FromBCP47(const std::string& locale_tag) { in FromBCP47()
85 return Locale::Invalid(); in FromBCP47()
91 return Locale::Invalid(); in FromBCP47()
117 return Locale(language.ToString(), script.ToString(), region.ToString()); in FromBCP47()
120 Locale Locale::FromLanguageTag(const LanguageTag* language_tag) { in FromLanguageTag()
122 return Locale::Invalid(); in FromLanguageTag()
127 return Locale::Invalid(); in FromLanguageTag()
145 return Locale(language.ToString(), script.ToString(), region.ToString()); in FromLanguageTag()
148 bool Locale::IsUnknown() const { in IsUnknown()
152 bool Locale::IsLocaleSupported(const Locale& locale, in IsLocaleSupported()
[all …]
Dlocale.h30 class Locale {
34 static Locale FromBCP47(const std::string& locale_tag);
37 static Locale FromLanguageTag(const LanguageTag* language_tag);
40 static Locale Invalid() { in Invalid()
41 Locale locale(/*language=*/"", /*script=*/"", /*region=*/""); in Invalid()
59 static bool IsAnyLocaleSupported(const std::vector<Locale>& locales,
60 const std::vector<Locale>& supported_locales,
63 bool operator==(const Locale& locale) const;
64 bool operator!=(const Locale& locale) const;
65 bool operator<(const Locale& locale) const;
[all …]
/external/libchrome/base/android/javatests/src/org/chromium/base/
DLocaleUtilsTest.java19 import java.util.Locale;
56 Locale locale = new Locale("jp"); in testGetUpdatedLocaleForChromium()
57 Locale updatedLocale = LocaleUtils.getUpdatedLocaleForChromium(locale); in testGetUpdatedLocaleForChromium()
60 locale = new Locale("iw"); in testGetUpdatedLocaleForChromium()
62 Assert.assertEquals(new Locale("he"), updatedLocale); in testGetUpdatedLocaleForChromium()
64 locale = new Locale("ji"); in testGetUpdatedLocaleForChromium()
66 Assert.assertEquals(new Locale("yi"), updatedLocale); in testGetUpdatedLocaleForChromium()
68 locale = new Locale("in"); in testGetUpdatedLocaleForChromium()
70 Assert.assertEquals(new Locale("id"), updatedLocale); in testGetUpdatedLocaleForChromium()
72 locale = new Locale("tl"); in testGetUpdatedLocaleForChromium()
[all …]
/external/icu/icu4j/demos/src/com/ibm/icu/dev/demo/rbnf/
DRbnfSampleRuleSets.java11 import java.util.Locale;
1699 public static final Locale[] sampleRuleSetLocales =
1700 { Locale.US,
1701 Locale.UK,
1702 new Locale("es", "", ""),
1703 Locale.FRANCE,
1704 new Locale("fr", "CH", ""),
1705 Locale.GERMAN,
1706 Locale.ITALIAN,
1707 new Locale("sv", "", ""),
[all …]
/external/libphonenumber/geocoder/test/com/google/i18n/phonenumbers/geocoding/
DPhoneNumberOfflineGeocoderTest.java22 import java.util.Locale;
73 geocoder.getDescriptionForNumber(US_NUMBER1, Locale.SIMPLIFIED_CHINESE)); in testGetDescriptionForNumberWithNoDataFile()
75 geocoder.getDescriptionForNumber(BS_NUMBER1, new Locale("en", "US"))); in testGetDescriptionForNumberWithNoDataFile()
77 geocoder.getDescriptionForNumber(AU_NUMBER, new Locale("en", "US"))); in testGetDescriptionForNumberWithNoDataFile()
79 new Locale("en", "US"))); in testGetDescriptionForNumberWithNoDataFile()
81 new Locale("en", "US"))); in testGetDescriptionForNumberWithNoDataFile()
88 geocoder.getDescriptionForNumber(US_NUMBER4, new Locale("en", "US"))); in testGetDescriptionForNumberWithMissingPrefix()
95 geocoder.getDescriptionForNumber(NANPA_TOLL_FREE, new Locale("en", "US"))); in testGetDescriptionForNumberBelongingToMultipleCountriesIsEmpty()
100 geocoder.getDescriptionForNumber(US_NUMBER1, new Locale("en", "US"))); in testGetDescriptionForNumber_en_US()
102 geocoder.getDescriptionForNumber(US_NUMBER2, new Locale("en", "US"))); in testGetDescriptionForNumber_en_US()
[all …]
/external/icu/icu4c/source/test/intltest/
Dloctest.cpp293 Locale testLocale(""); in TestBasicGetters()
295 … testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i], rawData[VAR][i]); in TestBasicGetters()
298 testLocale = Locale(rawData[LANG][i], rawData[CTRY][i], rawData[VAR][i]); in TestBasicGetters()
321 Locale testLocale(""); in TestBasicGetters()
323 testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i]); in TestBasicGetters()
326 testLocale = Locale(rawData[LANG][i], rawData[CTRY][i]); in TestBasicGetters()
344 Locale test8 = Locale::createFromName("x-klingon-latn-zx.utf32be@special"); in TestBasicGetters()
365 if (Locale::getDefault() != Locale::createFromName(NULL)) in TestBasicGetters()
374 Locale bogusLang("THISISABOGUSLANGUAGE"); // Jitterbug 2864: language code too long in TestBasicGetters()
379 bogusLang=Locale("eo"); in TestBasicGetters()
[all …]
Dlocalematchertest.cpp24 const char *locString(const Locale *loc) { in locString()
100 const Locale *best = matcher.getBestMatch(Locale::getFrench(), errorCode); in testEmpty()
126 Locale locales[] = { "fr", "en_GB", "en" }; in testBasics()
130 const Locale *best = matcher.getBestMatch("en_GB", errorCode); in testBasics()
141 std::vector<Locale> locales{ "fr", "en_GB", "en" }; in testBasics()
144 const Locale *best = matcher.getBestMatch("en_GB", errorCode); in testBasics()
154 Locale::RangeIterator<Locale *> iter(ARRAY_RANGE(locales)); in testBasics()
157 const Locale *best = matcher.getBestMatch("en_GB", errorCode); in testBasics()
167 Locale *pointers[] = { locales, locales + 1, locales + 2 }; in testBasics()
172 ARRAY_RANGE(pointers), [](const Locale *p) -> const Locale & { return *p; }). in testBasics()
[all …]
Dnumbertest_api.cpp44 FRENCH_SYMBOLS(Locale::getFrench(), status), in NumberFormatterApiTest()
45 SWISS_SYMBOLS(Locale("de-CH"), status), in NumberFormatterApiTest()
46 MYANMAR_SYMBOLS(Locale("my"), status) { in NumberFormatterApiTest()
134 Locale::getEnglish(), in notationSimple()
150 Locale::getEnglish(), in notationSimple()
166 Locale::getEnglish(), in notationSimple()
178 Locale::getEnglish(), in notationScientific()
194 Locale::getEnglish(), in notationScientific()
211 Locale::getEnglish(), in notationScientific()
227 Locale::getEnglish(), in notationScientific()
[all …]
/external/libphonenumber/carrier/test/com/google/i18n/phonenumbers/
DPhoneNumberToCarrierMapperTest.java21 import java.util.Locale;
66 carrierMapper.getNameForNumber(UK_MOBILE1, Locale.ENGLISH)); in testGetNameForMobilePortableRegion()
68 carrierMapper.getNameForNumber(UK_MOBILE1, new Locale("sv", "SE"))); in testGetNameForMobilePortableRegion()
70 carrierMapper.getNameForNumber(UK_MOBILE1, Locale.FRENCH)); in testGetNameForMobilePortableRegion()
72 assertEquals("", carrierMapper.getSafeDisplayName(UK_MOBILE1, Locale.ENGLISH)); in testGetNameForMobilePortableRegion()
77 carrierMapper.getNameForNumber(AO_MOBILE1, Locale.ENGLISH)); in testGetNameForNonMobilePortableRegion()
79 carrierMapper.getSafeDisplayName(AO_MOBILE1, Locale.ENGLISH)); in testGetNameForNonMobilePortableRegion()
83 assertEquals("", carrierMapper.getNameForNumber(AO_FIXED1, Locale.ENGLISH)); in testGetNameForFixedLineNumber()
84 assertEquals("", carrierMapper.getNameForNumber(UK_FIXED1, Locale.ENGLISH)); in testGetNameForFixedLineNumber()
88 carrierMapper.getNameForValidNumber(AO_FIXED2, Locale.ENGLISH)); in testGetNameForFixedLineNumber()
[all …]
/external/icu/icu4c/source/test/perf/normperf/
Ddtfmtrtperf.h117 const Locale testLocales[] = { in call()
118 Locale("en"), in call()
119 Locale("en_US"), in call()
120 Locale("en_AU"), in call()
121 Locale("de_DE"), in call()
122 Locale("fr"), in call()
123 Locale("ja_JP"), in call()
124 Locale("ko"), in call()
125 Locale("pt"), in call()
126 Locale("th_TH"), in call()
[all …]
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/
DLocaleNameTest.java13 import java.util.Locale;
30 … mGetDisplayScript = Locale.class.getMethod("getDisplayScript", new Class[] {Locale.class});
39 Locale[] locales = Locale.getAvailableLocales(); in TestLanguageNames()
41 for (Locale inLocale : locales) { in TestLanguageNames()
48 Locale inLocaleICU = TestUtil.toICUExtendedLocale(inLocale); in TestLanguageNames()
49 for (Locale forLocale : locales) { in TestLanguageNames()
105 Locale[] locales = Locale.getAvailableLocales(); in TestScriptNames()
106 for (Locale inLocale : locales) { in TestScriptNames()
113 Locale inLocaleICU = TestUtil.toICUExtendedLocale(inLocale); in TestScriptNames()
118 Locale forLocale = forULocale.toLocale(); in TestScriptNames()
[all …]
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/javaspi/
DICULocaleServiceProvider.java17 import java.util.Locale;
41 private static final Locale[] SPECIAL_LOCALES = {
42 new Locale("ja", "JP", "JP"),
43 new Locale("no"),
44 new Locale("no", "NO"),
45 new Locale("no", "NO", "NY"),
46 new Locale("sr", "CS"),
47 new Locale("th", "TH", "TH"),
50 private static Map<Locale, Locale> SPECIAL_LOCALES_MAP = null;
52 private static Locale[] LOCALES = null;
[all …]
/external/libchrome/base/android/java/src/org/chromium/base/
DLocaleUtils.java15 import java.util.Locale;
57 public static Locale getUpdatedLocaleForChromium(Locale locale) { in getUpdatedLocaleForChromium()
63 return new Locale.Builder().setLocale(locale).setLanguage(languageForChrome).build(); in getUpdatedLocaleForChromium()
91 public static Locale getUpdatedLocaleForAndroid(Locale locale) { in getUpdatedLocaleForAndroid()
97 return new Locale.Builder().setLocale(locale).setLanguage(languageForAndroid).build(); in getUpdatedLocaleForAndroid()
105 public static Locale forLanguageTagCompat(String languageTag) { in forLanguageTagCompat()
108 return new Locale(""); in forLanguageTagCompat()
112 return new Locale(""); in forLanguageTagCompat()
115 return new Locale(language); in forLanguageTagCompat()
119 return new Locale(language); in forLanguageTagCompat()
[all …]
/external/icu/icu4c/source/common/
Dlocid.cpp66 static Locale *gLocaleCache = NULL;
72 static Locale *gDefaultLocale = NULL;
115 delete (icu::Locale *) obj; in deleteLocale()
139 gLocaleCache = new Locale[(int)eMAX_LOCALES]; in locale_init()
145 gLocaleCache[eROOT] = Locale(""); in locale_init()
146 gLocaleCache[eENGLISH] = Locale("en"); in locale_init()
147 gLocaleCache[eFRENCH] = Locale("fr"); in locale_init()
148 gLocaleCache[eGERMAN] = Locale("de"); in locale_init()
149 gLocaleCache[eITALIAN] = Locale("it"); in locale_init()
150 gLocaleCache[eJAPANESE] = Locale("ja"); in locale_init()
[all …]
/external/icu/android_icu4j/testing/src/com/android/icu/test/util/
DCaseMapperNativeTest.java31 import java.util.Locale;
37 private static final Locale[] LOCALES = new Locale[]{
38 Locale.ROOT,
39 Locale.CANADA,
40 Locale.CANADA_FRENCH,
41 Locale.CHINA,
42 Locale.CHINESE,
43 Locale.ENGLISH,
44 Locale.FRANCE,
45 Locale.FRENCH,
[all …]
/external/apache-commons-math/src/main/java/org/apache/commons/math/
DMathRuntimeException.java26 import java.util.Locale;
135 private static String buildMessage(final Locale locale, final Localizable pattern, in buildMessage()
179 public String getMessage(final Locale locale) { in getMessage()
189 return getMessage(Locale.US); in getMessage()
195 return getMessage(Locale.getDefault()); in getLocalizedMessage()
253 return buildMessage(Locale.US, pattern, arguments); in createArithmeticException()
259 return buildMessage(Locale.getDefault(), pattern, arguments); in createArithmeticException()
297 return buildMessage(Locale.US, pattern, arguments); in createArrayIndexOutOfBoundsException()
303 return buildMessage(Locale.getDefault(), pattern, arguments); in createArrayIndexOutOfBoundsException()
341 return buildMessage(Locale.US, pattern, arguments);
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/
DBreakIteratorRegTest.java13 import java.util.Locale;
27 Locale thailand_locale = new Locale("th", "TH", ""); in TestRegUnreg()
28 Locale foo_locale = new Locale("fu", "FU", "FOO"); in TestRegUnreg()
29 BreakIterator jwbi = BreakIterator.getWordInstance(Locale.JAPAN); in TestRegUnreg()
30 BreakIterator uwbi = BreakIterator.getWordInstance(Locale.US); in TestRegUnreg()
31 BreakIterator usbi = BreakIterator.getSentenceInstance(Locale.US); in TestRegUnreg()
33 BreakIterator rwbi = BreakIterator.getWordInstance(new Locale("", "", "")); in TestRegUnreg()
43 Object key1 = BreakIterator.registerInstance(sbi, Locale.US, BreakIterator.KIND_WORD); in TestRegUnreg()
44 …Object key2 = BreakIterator.registerInstance((BreakIterator)twbi.clone(), Locale.US, BreakIterator… in TestRegUnreg()
47 BreakIterator test0 = BreakIterator.getWordInstance(Locale.JAPAN); in TestRegUnreg()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/
DBreakIteratorRegTest.java14 import java.util.Locale;
30 Locale thailand_locale = new Locale("th", "TH", ""); in TestRegUnreg()
31 Locale foo_locale = new Locale("fu", "FU", "FOO"); in TestRegUnreg()
32 BreakIterator jwbi = BreakIterator.getWordInstance(Locale.JAPAN); in TestRegUnreg()
33 BreakIterator uwbi = BreakIterator.getWordInstance(Locale.US); in TestRegUnreg()
34 BreakIterator usbi = BreakIterator.getSentenceInstance(Locale.US); in TestRegUnreg()
36 BreakIterator rwbi = BreakIterator.getWordInstance(new Locale("", "", "")); in TestRegUnreg()
46 Object key1 = BreakIterator.registerInstance(sbi, Locale.US, BreakIterator.KIND_WORD); in TestRegUnreg()
47 …Object key2 = BreakIterator.registerInstance((BreakIterator)twbi.clone(), Locale.US, BreakIterator… in TestRegUnreg()
50 BreakIterator test0 = BreakIterator.getWordInstance(Locale.JAPAN); in TestRegUnreg()
[all …]
/external/vogar/test/vogar/target/junit3/
DChangeDefaultLocaleTest.java19 import java.util.Locale;
29 assertEquals(Locale.US, Locale.getDefault()); in testDefault_Locale_CANADA()
30 Locale.setDefault(Locale.CANADA); in testDefault_Locale_CANADA()
34 assertEquals(Locale.US, Locale.getDefault()); in testDefault_Locale_CHINA()
35 Locale.setDefault(Locale.CHINA); in testDefault_Locale_CHINA()
/external/libtextclassifier/native/utils/
Dresources_test.cc132 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("en-US")}, in TEST_F()
135 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("en-GB")}, in TEST_F()
138 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("pt-PT")}, in TEST_F()
141 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("zh-Hans-CN")}, in TEST_F()
144 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("zh")}, in TEST_F()
147 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("fr-CA")}, in TEST_F()
158 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("en-CA")}, in TEST_F()
169 EXPECT_FALSE(resources.GetResourceContent({Locale::FromBCP47("es-US")}, in TEST_F()
179 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("es-US")}, in TEST_F()
191 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("fr-CH")}, in TEST_F()
[all …]

12345678910>>...64