Home
last modified time | relevance | path

Searched refs:locale (Results 1 – 25 of 98) sorted by relevance

1234

/libcore/ojluni/src/main/java/sun/util/
DLocaleServiceProviderPool.java181 for (Locale locale : allLocales) {
182 all.add(getLookupLocale(locale)); in getLookupLocale() argument
238 for (Locale locale: locales) { in getProviderLocales()
239 providerLocales.add(getLookupLocale(locale)); in getProviderLocales()
270 for (Locale locale : allLocales) { in getJRELocales()
271 tmpList.add(getLookupLocale(locale)); in getJRELocales()
287 private boolean isJRESupported(Locale locale) { in isJRESupported() argument
289 return locales.contains(getLookupLocale(locale)); in isJRESupported()
303 Locale locale, in getLocalizedObject() argument
305 return getLocalizedObjectImpl(getter, locale, true, null, null, null, params); in getLocalizedObject()
[all …]
/libcore/luni/src/main/java/libcore/icu/
DLocaleData.java122 public static Locale mapInvalidAndNullLocales(Locale locale) { in mapInvalidAndNullLocales() argument
123 if (locale == null) { in mapInvalidAndNullLocales()
127 if ("und".equals(locale.toLanguageTag())) { in mapInvalidAndNullLocales()
131 return locale; in mapInvalidAndNullLocales()
137 public static LocaleData get(Locale locale) { in get() argument
138 if (locale == null) { in get()
142 final String languageTag = locale.toLanguageTag(); in get()
149 LocaleData newLocaleData = initLocaleData(locale); in get()
202 private static LocaleData initLocaleData(Locale locale) { in initLocaleData() argument
204 if (!ICU.initLocaleDataNative(locale.toLanguageTag(), localeData)) { in initLocaleData()
[all …]
DTimeZoneNames.java61 @Override protected String[][] create(Locale locale) { in create() argument
71 fillZoneStrings(locale.toString(), result); in create()
81 System.logI("Loaded time zone names for \"" + locale + "\" in " + duration + "ms" + in create()
131 public static String[][] getZoneStrings(Locale locale) { in getZoneStrings() argument
132 if (locale == null) { in getZoneStrings()
133 locale = Locale.getDefault(); in getZoneStrings()
135 return cachedZoneStrings.get(locale); in getZoneStrings()
145 public static String[] forLocale(Locale locale) { in forLocale() argument
146 String countryCode = locale.getCountry(); in forLocale()
161 public static native String getExemplarLocation(String locale, String tz); in getExemplarLocation() argument
[all …]
DICU.java289 public static String getBestDateTimePattern(String skeleton, Locale locale) { in getBestDateTimePattern() argument
290 String languageTag = locale.toLanguageTag(); in getBestDateTimePattern()
362 public static String toLowerCase(String s, Locale locale) { in toLowerCase() argument
363 return toLowerCase(s, locale.toLanguageTag()); in toLowerCase()
368 public static String toUpperCase(String s, Locale locale) { in toUpperCase() argument
369 return toUpperCase(s, locale.toLanguageTag()); in toUpperCase()
399 public static String getCurrencyDisplayName(Locale locale, String currencyCode) { in getCurrencyDisplayName() argument
400 return getCurrencyDisplayName(locale.toLanguageTag(), currencyCode); in getCurrencyDisplayName()
408 public static String getCurrencySymbol(Locale locale, String currencyCode) { in getCurrencySymbol() argument
409 return getCurrencySymbol(locale.toLanguageTag(), currencyCode); in getCurrencySymbol()
[all …]
DRelativeDateTimeFormatter.java91 public static String getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, in getRelativeTimeSpanString() argument
96 return getRelativeTimeSpanString(locale, tz, time, now, minResolution, flags, displayContext); in getRelativeTimeSpanString()
99 public static String getRelativeTimeSpanString(Locale locale, java.util.TimeZone tz, long time, in getRelativeTimeSpanString() argument
101 if (locale == null) { in getRelativeTimeSpanString()
107 ULocale icuLocale = ULocale.forLocale(locale); in getRelativeTimeSpanString()
260 public static String getRelativeDateTimeString(Locale locale, java.util.TimeZone tz, long time, in getRelativeDateTimeString() argument
263 if (locale == null) { in getRelativeDateTimeString()
269 ULocale icuLocale = ULocale.forLocale(locale); in getRelativeDateTimeString()
338 ULocale locale, android.icu.text.RelativeDateTimeFormatter.Style style, in getFormatter() argument
340 String key = locale + "\t" + style + "\t" + displayContext; in getFormatter()
[all …]
/libcore/ojluni/src/main/java/java/text/
DBreakIterator.java454 public static BreakIterator getWordInstance(Locale locale) { in getWordInstance() argument
456 android.icu.text.BreakIterator.getWordInstance(locale)); in getWordInstance()
479 public static BreakIterator getLineInstance(Locale locale) { in getLineInstance() argument
481 android.icu.text.BreakIterator.getLineInstance(locale)); in getLineInstance()
504 public static BreakIterator getCharacterInstance(Locale locale) { in getCharacterInstance() argument
506 android.icu.text.BreakIterator.getCharacterInstance(locale)); in getCharacterInstance()
529 public static BreakIterator getSentenceInstance(Locale locale) { in getSentenceInstance() argument
531 android.icu.text.BreakIterator.getSentenceInstance(locale)); in getSentenceInstance()
DDateFormatSymbols.java138 public DateFormatSymbols(Locale locale) in DateFormatSymbols() argument
140 initializeData(locale); in DateFormatSymbols()
277 Locale locale = null; field in DateFormatSymbols
403 public static final DateFormatSymbols getInstance(Locale locale) { in getInstance() argument
404 DateFormatSymbols dfs = getProviderInstance(locale); in getInstance()
408 return (DateFormatSymbols) getCachedInstance(locale).clone(); in getInstance()
417 static final DateFormatSymbols getInstanceRef(Locale locale) { in getInstanceRef() argument
418 DateFormatSymbols dfs = getProviderInstance(locale); in getInstanceRef()
422 return getCachedInstance(locale); in getInstanceRef()
425 private static DateFormatSymbols getProviderInstance(Locale locale) { in getProviderInstance() argument
[all …]
DDecimalFormatSymbols.java95 public DecimalFormatSymbols( Locale locale ) { in DecimalFormatSymbols() argument
96 initialize( locale ); in DecimalFormatSymbols()
145 public static final DecimalFormatSymbols getInstance(Locale locale) { in getInstance() argument
153 DecimalFormatSymbolsGetter.INSTANCE, locale); in getInstance()
159 return new DecimalFormatSymbols(locale); in getInstance()
396 currencySymbol = currency.getSymbol(locale); in setInternationalCurrencySymbol()
433 currencySymbol = currency.getSymbol(locale); in setCurrency()
547 locale.equals(other.locale)); in equals()
569 result = result * 37 + locale.hashCode(); in hashCode()
576 private void initialize( Locale locale ) { in initialize() argument
[all …]
DMessageFormat.java363 this.locale = Locale.getDefault(Locale.Category.FORMAT); in MessageFormat()
380 public MessageFormat(String pattern, Locale locale) { in MessageFormat() argument
381 this.locale = locale; in MessageFormat()
402 public void setLocale(Locale locale) { in setLocale() argument
403 this.locale = locale; in setLocale()
412 return locale; in getLocale()
534 if (fmt.equals(NumberFormat.getInstance(locale))) { in toPattern()
536 } else if (fmt.equals(NumberFormat.getCurrencyInstance(locale))) { in toPattern()
538 } else if (fmt.equals(NumberFormat.getPercentInstance(locale))) { in toPattern()
540 } else if (fmt.equals(NumberFormat.getIntegerInstance(locale))) { in toPattern()
[all …]
/libcore/ojluni/src/main/java/java/util/
DCurrency.java129 public static Currency getInstance(Locale locale) { in getInstance() argument
131 android.icu.util.Currency.getInstance(locale); in getInstance()
132 String variant = locale.getVariant(); in getInstance()
133 String country = locale.getCountry(); in getInstance()
140 throw new IllegalArgumentException("Unsupported ISO 3166 country: " + locale); in getInstance()
209 public String getSymbol(Locale locale) { in getSymbol() argument
210 if (locale == null) { in getSymbol()
213 return icuCurrency.getSymbol(locale); in getSymbol()
265 public String getDisplayName(Locale locale) { in getDisplayName() argument
266 return icuCurrency.getDisplayName(locale); in getDisplayName()
DResourceBundle.java64 import sun.util.locale.BaseLocale;
65 import sun.util.locale.LocaleObjectCache;
314 private Locale locale = null; field in ResourceBundle
415 return locale; in getLocale()
492 private Locale locale; field in ResourceBundle.CacheKey
516 CacheKey(String baseName, Locale locale, ClassLoader loader) { in CacheKey() argument
518 this.locale = locale; in CacheKey()
540 return locale; in getLocale()
543 CacheKey setLocale(Locale locale) { in setLocale() argument
544 if (!this.locale.equals(locale)) { in setLocale()
[all …]
DLocale.java56 import sun.util.locale.BaseLocale;
57 import sun.util.locale.InternalLocaleBuilder;
58 import sun.util.locale.LanguageTag;
59 import sun.util.locale.LocaleExtensions;
60 import sun.util.locale.LocaleObjectCache;
61 import sun.util.locale.LocaleSyntaxException;
62 import sun.util.locale.LocaleUtils;
63 import sun.util.locale.ParseStatus;
64 import sun.util.locale.UnicodeLocaleExtension;
1615 public String getDisplayLanguage(Locale locale) { in getDisplayLanguage() argument
[all …]
/libcore/ojluni/src/main/java/java/text/spi/
DNumberFormatProvider.java61 public abstract NumberFormat getCurrencyInstance(Locale locale); in getCurrencyInstance() argument
82 public abstract NumberFormat getIntegerInstance(Locale locale); in getIntegerInstance() argument
97 public abstract NumberFormat getNumberInstance(Locale locale); in getNumberInstance() argument
112 public abstract NumberFormat getPercentInstance(Locale locale); in getPercentInstance() argument
DBreakIteratorProvider.java61 public abstract BreakIterator getWordInstance(Locale locale); in getWordInstance() argument
76 public abstract BreakIterator getLineInstance(Locale locale); in getLineInstance() argument
91 public abstract BreakIterator getCharacterInstance(Locale locale); in getCharacterInstance() argument
106 public abstract BreakIterator getSentenceInstance(Locale locale); in getSentenceInstance() argument
DDateFormatProvider.java66 public abstract DateFormat getTimeInstance(int style, Locale locale); in getTimeInstance() argument
86 public abstract DateFormat getDateInstance(int style, Locale locale); in getDateInstance() argument
113 getDateTimeInstance(int dateStyle, int timeStyle, Locale locale); in getDateTimeInstance() argument
/libcore/ojluni/src/main/java/java/util/spi/
DLocaleNameProvider.java69 public abstract String getDisplayLanguage(String languageCode, Locale locale); in getDisplayLanguage() argument
97 public String getDisplayScript(String scriptCode, Locale locale) { in getDisplayScript() argument
125 public abstract String getDisplayCountry(String countryCode, Locale locale); in getDisplayCountry() argument
143 public abstract String getDisplayVariant(String variant, Locale locale); in getDisplayVariant() argument
DCurrencyNameProvider.java74 public abstract String getSymbol(String currencyCode, Locale locale); in getSymbol() argument
95 public String getDisplayName(String currencyCode, Locale locale) { in getDisplayName() argument
96 if (currencyCode == null || locale == null) { in getDisplayName()
113 if (!avail.contains(locale)) { in getDisplayName()
/libcore/luni/src/test/java/libcore/java/util/
DOldAndroidLocaleTest.java36 Locale locale = new Locale("en"); in testLocale() local
37 assertEquals("en", locale.toString()); in testLocale()
39 locale = new Locale("en", "US"); in testLocale()
40 assertEquals("en_US", locale.toString()); in testLocale()
42 locale = new Locale("en", "", "POSIX"); in testLocale()
43 assertEquals("en__POSIX", locale.toString()); in testLocale()
45 locale = new Locale("en", "US", "POSIX"); in testLocale()
46 assertEquals("en_US_POSIX", locale.toString()); in testLocale()
/libcore/benchmarks/src/benchmarks/regression/
DBreakIteratorBenchmark.java39 final Locale locale; field in BreakIteratorBenchmark.Text
42 Text(Locale locale, String text) { in Text() argument
44 this.locale = locale; in Text()
52 BreakIterator it = BreakIterator.getLineInstance(text.locale); in timeBreakIterator()
63 android.icu.text.BreakIterator.getLineInstance(text.locale); in timeIcuBreakIterator()
/libcore/libart/src/main/java/java/lang/
DCaseMapper.java45 public static String toLowerCase(Locale locale, String s) { in toLowerCase() argument
48 String languageCode = locale.getLanguage(); in toLowerCase()
50 return ICU.toLowerCase(s, locale); in toLowerCase()
59 return ICU.toLowerCase(s, locale); in toLowerCase()
145 public static String toUpperCase(Locale locale, String s, int count) { in toUpperCase() argument
146 String languageCode = locale.getLanguage(); in toUpperCase()
148 return ICU.toUpperCase(s, locale); in toUpperCase()
160 return ICU.toUpperCase(s, locale); in toUpperCase()
/libcore/luni/src/main/native/
Dlibcore_icu_ICU.cpp110 return env->NewStringUTF(icuLocale.locale().getScript()); in ICU_getScript()
226 icuTargetLocale.locale().getDisplayCountry(icuLocale.locale(), str); in ICU_getDisplayCountryNative()
241 icuTargetLocale.locale().getDisplayLanguage(icuLocale.locale(), str); in ICU_getDisplayLanguageNative()
256 icuTargetLocale.locale().getDisplayScript(icuLocale.locale(), str); in ICU_getDisplayScriptNative()
271 icuTargetLocale.locale().getDisplayVariant(icuLocale.locale(), str); in ICU_getDisplayVariantNative()
280 return env->NewStringUTF(icuLocale.locale().getISO3Country()); in ICU_getISO3Country()
288 return env->NewStringUTF(icuLocale.locale().getISO3Language()); in ICU_getISO3Language()
381 static void setNumberPatterns(JNIEnv* env, jobject obj, icu::Locale& locale) { in setNumberPatterns() argument
385 …> fmt(static_cast<icu::DecimalFormat*>(icu::NumberFormat::createInstance(locale, UNUM_CURRENCY, st… in setNumberPatterns()
389 …fmt.reset(static_cast<icu::DecimalFormat*>(icu::NumberFormat::createInstance(locale, UNUM_DECIMAL,… in setNumberPatterns()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatSymbolsTest.java69 for (Locale locale : locales) { in test_getAvailableLocales_no_provider()
70 if (locale.equals(Locale.US)) { in test_getAvailableLocales_no_provider()
98 Locale locale = new Locale("not exist language", "not exist country"); in test_getInstanceLjava_util_Locale() local
99 DecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance(locale); in test_getInstanceLjava_util_Locale()
285 Locale locale = Locale.CANADA; in test_setCurrencyLjava_util_Currency() local
287 .getCurrencyInstance(locale)).getDecimalFormatSymbols(); in test_setCurrencyLjava_util_Currency()
300 locale), dfs.getCurrencySymbol()); in test_setCurrencyLjava_util_Currency()
368 Locale locale = Locale.CANADA; in test_setInternationalCurrencySymbolLjava_lang_String() local
370 .getCurrencyInstance(locale)).getDecimalFormatSymbols(); in test_setInternationalCurrencySymbolLjava_lang_String()
377 .getSymbol(locale), dfs.getCurrencySymbol()); in test_setInternationalCurrencySymbolLjava_lang_String()
DRuleBasedCollatorTest.java102 Locale locale = Locale.forLanguageTag("es-u-co-trad"); in testGetCollationElementIteratorString() local
103 RuleBasedCollator coll = (RuleBasedCollator) Collator.getInstance(locale); in testGetCollationElementIteratorString()
119 Locale locale = new Locale("de", "DE"); in testGetCollationElementIteratorString() local
120 RuleBasedCollator coll = (RuleBasedCollator) Collator.getInstance(locale); in testGetCollationElementIteratorString()
144 Locale locale = Locale.forLanguageTag("es-u-co-trad"); in testGetCollationElementIteratorCharacterIterator() local
145 RuleBasedCollator coll = (RuleBasedCollator) Collator.getInstance(locale); in testGetCollationElementIteratorCharacterIterator()
163 Locale locale = new Locale("de", "DE"); in testGetCollationElementIteratorCharacterIterator() local
164 RuleBasedCollator coll = (RuleBasedCollator) Collator.getInstance(locale); in testGetCollationElementIteratorCharacterIterator()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCalendarTest.java797 for (Locale locale : locales) { in test_getDisplayNameIILjava_util_Locale()
798 DateFormatSymbols symbols = new DateFormatSymbols(locale); in test_getDisplayNameIILjava_util_Locale()
805 locale), value); in test_getDisplayNameIILjava_util_Locale()
807 locale), value); in test_getDisplayNameIILjava_util_Locale()
811 locale), value); in test_getDisplayNameIILjava_util_Locale()
813 locale), value); in test_getDisplayNameIILjava_util_Locale()
819 locale), value); in test_getDisplayNameIILjava_util_Locale()
821 locale), value); in test_getDisplayNameIILjava_util_Locale()
825 locale), value); in test_getDisplayNameIILjava_util_Locale()
827 locale), value); in test_getDisplayNameIILjava_util_Locale()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/
DMockParser.java64 public void setLocale(Locale locale) throws SAXException { in setLocale() argument
65 logger.add("setLocale", locale); in setLocale()

1234