/external/icu/icu4c/source/common/unicode/ |
D | locid.h | 192 class U_COMMON_API Locale : public UObject { 195 static const Locale &U_EXPORT2 getRoot(void); 197 static const Locale &U_EXPORT2 getEnglish(void); 199 static const Locale &U_EXPORT2 getFrench(void); 201 static const Locale &U_EXPORT2 getGerman(void); 203 static const Locale &U_EXPORT2 getItalian(void); 205 static const Locale &U_EXPORT2 getJapanese(void); 207 static const Locale &U_EXPORT2 getKorean(void); 209 static const Locale &U_EXPORT2 getChinese(void); 211 static const Locale &U_EXPORT2 getSimplifiedChinese(void); [all …]
|
D | brkiter.h | 365 createWordInstance(const Locale& where, UErrorCode& status); 389 createLineInstance(const Locale& where, UErrorCode& status); 411 createCharacterInstance(const Locale& where, UErrorCode& status); 432 createSentenceInstance(const Locale& where, UErrorCode& status); 457 createTitleInstance(const Locale& where, UErrorCode& status); 468 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count); 479 static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale, 480 const Locale& displayLocale, 491 static UnicodeString& U_EXPORT2 getDisplayName(const Locale& objectLocale, 546 const Locale& locale, [all …]
|
/external/libtextclassifier/utils/i18n/ |
D | locale_test.cc | 25 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 …]
|
D | locale.cc | 80 Locale Locale::FromBCP47(const std::string& locale_tag) { in FromBCP47() 83 return Locale::Invalid(); in FromBCP47() 89 return Locale::Invalid(); in FromBCP47() 115 return Locale(language.ToString(), script.ToString(), region.ToString()); in FromBCP47() 118 bool Locale::IsUnknown() const { in IsUnknown() 122 bool Locale::IsLocaleSupported(const Locale& locale, in IsLocaleSupported() 123 const std::vector<Locale>& supported_locales, in IsLocaleSupported() 131 for (const Locale& supported_locale : supported_locales) { in IsLocaleSupported() 154 bool Locale::IsAnyLocaleSupported(const std::vector<Locale>& locales, in IsAnyLocaleSupported() 155 const std::vector<Locale>& supported_locales, in IsAnyLocaleSupported() [all …]
|
D | locale.h | 29 class Locale { 33 static Locale FromBCP47(const std::string& locale_tag); 36 static Locale Invalid() { in Invalid() 37 Locale locale(/*language=*/"", /*script=*/"", /*region=*/""); in Invalid() 55 static bool IsAnyLocaleSupported(const std::vector<Locale>& locales, 56 const std::vector<Locale>& supported_locales, 60 Locale(const std::string& language, const std::string& script, in Locale() function 67 static bool IsLocaleSupported(const Locale& locale, 68 const std::vector<Locale>& supported_locales, 79 const Locale& locale); [all …]
|
/external/icu/icu4c/source/common/ |
D | locid.cpp | 61 static Locale *gLocaleCache = NULL; 67 static Locale *gDefaultLocale = NULL; 117 delete (icu::Locale *) obj; in deleteLocale() 141 gLocaleCache = new Locale[(int)eMAX_LOCALES]; in locale_init() 147 gLocaleCache[eROOT] = Locale(""); in locale_init() 148 gLocaleCache[eENGLISH] = Locale("en"); in locale_init() 149 gLocaleCache[eFRENCH] = Locale("fr"); in locale_init() 150 gLocaleCache[eGERMAN] = Locale("de"); in locale_init() 151 gLocaleCache[eITALIAN] = Locale("it"); in locale_init() 152 gLocaleCache[eJAPANESE] = Locale("ja"); in locale_init() [all …]
|
/external/icu/icu4j/demos/src/com/ibm/icu/dev/demo/rbnf/ |
D | RbnfSampleRuleSets.java | 11 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/ |
D | PhoneNumberOfflineGeocoderTest.java | 22 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/ |
D | loctest.cpp | 264 Locale testLocale(""); in TestBasicGetters() 266 … testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i], rawData[VAR][i]); in TestBasicGetters() 269 testLocale = Locale(rawData[LANG][i], rawData[CTRY][i], rawData[VAR][i]); in TestBasicGetters() 292 Locale testLocale(""); in TestBasicGetters() 294 testLocale = Locale(rawData[LANG][i], rawData[SCRIPT][i], rawData[CTRY][i]); in TestBasicGetters() 297 testLocale = Locale(rawData[LANG][i], rawData[CTRY][i]); in TestBasicGetters() 315 Locale test8 = Locale::createFromName("x-klingon-latn-zx.utf32be@special"); in TestBasicGetters() 336 if (Locale::getDefault() != Locale::createFromName(NULL)) in TestBasicGetters() 345 Locale bogusLang("THISISABOGUSLANGUAGE"); // Jitterbug 2864: language code too long in TestBasicGetters() 350 bogusLang=Locale("eo"); in TestBasicGetters() [all …]
|
D | numbertest_api.cpp | 34 FRENCH_SYMBOLS(Locale::getFrench(), status), in NumberFormatterApiTest() 35 SWISS_SYMBOLS(Locale("de-CH"), status), in NumberFormatterApiTest() 36 MYANMAR_SYMBOLS(Locale("my"), status) { in NumberFormatterApiTest() 101 Locale::getEnglish(), in notationSimple() 116 Locale::getEnglish(), in notationSimple() 131 Locale::getEnglish(), in notationSimple() 142 Locale::getEnglish(), in notationScientific() 157 Locale::getEnglish(), in notationScientific() 173 Locale::getEnglish(), in notationScientific() 188 Locale::getEnglish(), in notationScientific() [all …]
|
D | svccoll.cpp | 38 const Locale& FR = Locale::getFrance(); in TestRegister() 39 const Locale& US = Locale::getUS(); in TestRegister() 40 const Locale US_FOO("en", "US", "FOO"); in TestRegister() 67 Locale loc = ncol->getLocale(ULOC_REQUESTED_LOCALE, status); in TestRegister() 99 Locale fu_FU_FOO("fu", "FU", "FOO"); in TestRegister() 100 Locale fu_FU("fu", "FU", ""); in TestRegister() 160 const Locale& defaultLocale = Locale::getDefault(); in TestRegister() 162 …((defaultLocale == Locale::getKorean() && defaultLocale == Locale::getJapanese()) && displayName =… in TestRegister() 163 ((defaultLocale == Locale::getChinese()) && displayName != zh_fuFU)) { in TestRegister() 169 …((defaultLocale == Locale::getKorean() && defaultLocale == Locale::getJapanese()) && displayName =… in TestRegister() [all …]
|
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/ |
D | LocaleNameTest.java | 13 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/libphonenumber/carrier/test/com/google/i18n/phonenumbers/ |
D | PhoneNumberToCarrierMapperTest.java | 21 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/ |
D | dtfmtrtperf.h | 117 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/classes/localespi/src/com/ibm/icu/impl/javaspi/ |
D | ICULocaleServiceProvider.java | 17 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/apache-commons-math/src/main/java/org/apache/commons/math/ |
D | MathRuntimeException.java | 26 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/eclipse-build/plugins.template/com.ibm.icu.base.tests/src/com/ibm/icu/tests/ |
D | ULocaleTest.java | 13 import java.util.Locale; 24 private Locale sampleLocale; 55 assertEquals(ULocale.GERMANY, ULocale.forLocale(Locale.GERMANY)); in testForLocale() 98 assertEquals(Locale.getDefault(), ULocale.getDefault().toLocale()); in testGetDefault() 105 Locale oldLocale = Locale.getDefault(); in testSetDefault() 109 ICUTestCase.assertNotEqual(Locale.getDefault(), oldLocale); in testSetDefault() 112 assertEquals(sampleLocale, Locale.getDefault()); in testSetDefault() 116 Locale.setDefault(oldLocale); // in case of some error in testSetDefault() 140 Locale[] locales = Locale.getAvailableLocales(); in testGetAvailableLocales() 359 String jl = Locale.GERMANY.getISO3Language(); in testGetISO3Language() [all …]
|
D | DateFormatSymbolsTest.java | 12 import java.util.Locale; 23 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testHashCode() 25 DateFormatSymbols dfsn = new DateFormatSymbols(Locale.US); in testHashCode() 49 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testDateFormatSymbolsLocale() 65 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testGetEras() 73 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testSetEras() 87 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testGetMonths() 95 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testSetMonths() 109 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testGetShortMonths() 117 DateFormatSymbols dfs = new DateFormatSymbols(Locale.US); in testSetShortMonths() [all …]
|
D | MessageFormatTest.java | 16 import java.util.Locale; 63 MessageFormat mf = new MessageFormat(pattern, Locale.US); in testMessageFormatStringLocale() 79 MessageFormat mf = new MessageFormat(pattern, Locale.US); in testSetLocaleLocale() 80 mf.setLocale(Locale.GERMANY); in testSetLocaleLocale() 89 MessageFormat mf = new MessageFormat(pattern, Locale.US); in testSetLocaleULocale() 99 MessageFormat mf = new MessageFormat(pattern, Locale.US); in testGetLocale() 100 mf.setLocale(Locale.GERMANY); in testGetLocale() 101 assertEquals(Locale.GERMANY, mf.getLocale()); in testGetLocale() 108 MessageFormat mf = new MessageFormat(pattern, Locale.US); in testGetULocale() 153 MessageFormat mf = new MessageFormat(pattern, Locale.US); in testSetFormats() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/ |
D | BreakIteratorRegTest.java | 14 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/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/rbbi/ |
D | BreakIteratorRegTest.java | 13 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/libtextclassifier/utils/ |
D | resources_test.cc | 145 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("en-US")}, in TEST_P() 148 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("en-GB")}, in TEST_P() 151 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("pt-PT")}, in TEST_P() 154 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("zh-Hans-CN")}, in TEST_P() 157 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("zh")}, in TEST_P() 160 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("fr-CA")}, in TEST_P() 171 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("en-CA")}, in TEST_P() 182 EXPECT_FALSE(resources.GetResourceContent({Locale::FromBCP47("es-US")}, in TEST_P() 192 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("es-US")}, in TEST_P() 204 EXPECT_TRUE(resources.GetResourceContent({Locale::FromBCP47("fr-CH")}, in TEST_P() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
D | DateFormatRegressionTest.java | 29 import java.util.Locale; 98 … DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.US); in Test4052408() 179 SimpleDateFormat fmt = new SimpleDateFormat("yyMMdd", Locale.US); in Test4056591() 312 Locale saveLocale = Locale.getDefault(); in Test4065240() 316 Locale curLocale = new Locale("de", "DE"); in Test4065240() 317 Locale.setDefault(curLocale); in Test4065240() 356 Locale.setDefault(saveLocale); in Test4065240() 415 DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); in Test4073003() 461 Locale locales[] = { in Test4100302() 462 Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA, in Test4100302() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | DateFormatRegressionTest.java | 28 import java.util.Locale; 95 … DateFormat fmt = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, Locale.US); in Test4052408() 176 SimpleDateFormat fmt = new SimpleDateFormat("yyMMdd", Locale.US); in Test4056591() 309 Locale saveLocale = Locale.getDefault(); in Test4065240() 313 Locale curLocale = new Locale("de", "DE"); in Test4065240() 314 Locale.setDefault(curLocale); in Test4065240() 353 Locale.setDefault(saveLocale); in Test4065240() 412 DateFormat fmt = DateFormat.getDateInstance(DateFormat.SHORT, Locale.US); in Test4073003() 458 Locale locales[] = { in Test4100302() 459 Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA, in Test4100302() [all …]
|
/external/vogar/test/vogar/target/junit3/ |
D | ChangeDefaultLocaleTest.java | 19 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()
|