Searched refs:locale (Results 1 - 25 of 123) sorted by relevance

12345

/libcore/benchmarks/src/benchmarks/regression/
H A DDecimalFormatSymbolsBenchmark.java23 private static Locale locale = Locale.getDefault(Locale.Category.FORMAT); field in class:DecimalFormatSymbolsBenchmark
27 new DecimalFormatSymbols(locale);
H A DNumberFormatBenchmark.java24 private static Locale locale = Locale.getDefault(Locale.Category.FORMAT); field in class:NumberFormatBenchmark
28 NumberFormat.getInstance(locale);
H A DBreakIteratorBenchmark.java39 final Locale locale; field in class:BreakIteratorBenchmark.Text
42 Text(Locale locale, String text) { argument
44 this.locale = locale;
52 BreakIterator it = BreakIterator.getLineInstance(text.locale);
63 android.icu.text.BreakIterator.getLineInstance(text.locale);
/libcore/ojluni/src/test/java/time/test/java/util/
H A DTestFormatter.java119 for (Locale locale : locales) {
121 testDate(fmtStr, locale, zdt, cal);
124 testTime(fmtStr, locale, zdt, cal);
126 testZoneId(locale, zdt, cal);
127 testInstant(locale, instant, zdt, cal);
157 private String test(String fmtStr, Locale locale, argument
160 new StringBuilder(), locale).format(fmtStr, dt).out().toString();
174 private void printFmtStr(Locale locale, String fmtStr) { argument
177 System.out.printf("[%s, %s]%n", locale.toString(), fmtStr);
181 private void testDate(String fmtStr, Locale locale, argument
193 testTime(String fmtStr, Locale locale, ChronoZonedDateTime<?> zdt, Calendar cal) argument
219 testZoneId(Locale locale, ChronoZonedDateTime<?> zdt, Calendar cal) argument
243 testInstant(Locale locale, Instant instant, ChronoZonedDateTime<?> zdt, Calendar cal) argument
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DBreakIterator.java437 * for the {@linkplain Locale#getDefault() default locale}.
448 * for the given locale.
449 * @param locale the desired locale
451 * @exception NullPointerException if <code>locale</code> is null
453 public static BreakIterator getWordInstance(Locale locale) argument
457 android.icu.text.BreakIterator.getWordInstance(locale));
463 * for the {@linkplain Locale#getDefault() default locale}.
474 * for the given locale.
475 * @param locale th
479 getLineInstance(Locale locale) argument
505 getCharacterInstance(Locale locale) argument
531 getSentenceInstance(Locale locale) argument
[all...]
H A DDateFormatSymbols.java78 * format pattern for a specific locale, you can do so with:
109 * locale. It is recommended that the {@link #getInstance(Locale) getInstance} method is used
118 * if the resources for the default locale cannot be
130 * resources for the given locale. It is recommended that the
133 * @param locale the desired locale
136 * if the resources for the specified locale cannot be
139 public DateFormatSymbols(Locale locale) argument
141 initializeData(locale);
197 * Localized names of time zones in this locale
283 Locale locale = null; field in class:DateFormatSymbols
406 getInstance(Locale locale) argument
417 getInstanceRef(Locale locale) argument
429 getCachedInstance(Locale locale) argument
820 initializeData(Locale locale) argument
[all...]
/libcore/ojluni/src/test/java/time/test/java/time/format/
H A DTestZoneTextPrinterParser.java63 protected static DateTimeFormatter getFormatter(Locale locale, TextStyle style) { argument
65 .toFormatter(locale)
66 .withDecimalStyle(DecimalStyle.of(locale));
77 //System.out.printf("locale==%d, timezone=%d%n", locales.length, zids.size());
82 // per locale, but the cache only holds the most recently used locales.
83 for (Locale locale : locales) {
85 if (locale.getLanguage().equals("ji")) {
104 printText(locale, zdt, TextStyle.FULL, tz,
105 tz.getDisplayName(isDST, TimeZone.LONG, locale));
106 printText(locale, zd
113 printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String expected) argument
191 test_ParseText(String expected, String text, Set<ZoneId> preferred, Locale locale, TextStyle style) argument
208 parseText(Set<String> zids, Locale locale, TextStyle style, boolean ci) argument
226 parse(DateTimeFormatter fmt, String zid, String expected, String text, Locale locale, TextStyle style, boolean ci) argument
248 getFormatter(Locale locale, TextStyle style, boolean ci) argument
[all...]
H A DAbstractTestPrinterParser.java87 protected Locale locale; field in class:AbstractTestPrinterParser
96 locale = Locale.ENGLISH;
117 return builder.toFormatter(locale).withDecimalStyle(decimalStyle);
121 return builder.appendLiteral(c).toFormatter(locale).withDecimalStyle(decimalStyle);
125 return builder.appendLiteral(s).toFormatter(locale).withDecimalStyle(decimalStyle);
129 return builder.appendText(field).toFormatter(locale).withDecimalStyle(decimalStyle);
133 return builder.appendText(field, style).toFormatter(locale).withDecimalStyle(decimalStyle);
137 return builder.appendValue(field, minWidth, maxWidth, signStyle).toFormatter(locale).withDecimalStyle(decimalStyle);
141 return builder.appendOffset(pattern, noOffsetText).toFormatter(locale).withDecimalStyle(decimalStyle);
145 return builder.appendPattern(pattern).toFormatter(locale)
[all...]
/libcore/luni/src/main/java/libcore/icu/
H A DLocaleData.java25 * Passes locale-specific from ICU native code to Java.
32 // A cache for the locale-specific data.
35 // Ensure that we pull in the locale data for the root locale, en_US, and the
36 // user's default locale. (All devices must support the root locale and en_US,
117 public static Locale mapInvalidAndNullLocales(Locale locale) { argument
118 if (locale == null) {
122 if ("und".equals(locale.toLanguageTag())) {
126 return locale;
132 get(Locale locale) argument
197 initLocaleData(Locale locale) argument
[all...]
H A DTimeZoneNames.java52 @Override protected String[][] create(Locale locale) { argument
62 fillZoneStrings(locale.toLanguageTag(), result);
73 System.logI("Loaded time zone names for \"" + locale + "\" in " + duration + "ms" +
148 public static String[][] getZoneStrings(Locale locale) { argument
149 if (locale == null) {
150 locale = Locale.getDefault();
152 return cachedZoneStrings.get(locale);
157 * the given locale. This is not necessary for Java API, but is used by telephony as a
162 public static String[] forLocale(Locale locale) { argument
163 String countryCode = locale
178 fillZoneStrings(String locale, String[][] result) argument
[all...]
H A DICU.java68 * Parse the {Language, Script, Region, Variant*} section of the ICU locale
289 public static String getBestDateTimePattern(String skeleton, Locale locale) { argument
290 String languageTag = locale.toLanguageTag();
362 public static String toLowerCase(String s, Locale locale) { argument
363 return toLowerCase(s, locale.toLanguageTag());
368 public static String toUpperCase(String s, Locale locale) { argument
369 return toUpperCase(s, locale.toLanguageTag());
399 public static String getCurrencyDisplayName(Locale locale, String currencyCode) { argument
400 return getCurrencyDisplayName(locale.toLanguageTag(), currencyCode);
408 public static String getCurrencySymbol(Locale locale, Strin argument
414 getDisplayCountry(Locale targetLocale, Locale locale) argument
420 getDisplayLanguage(Locale targetLocale, Locale locale) argument
426 getDisplayVariant(Locale targetLocale, Locale locale) argument
432 getDisplayScript(Locale targetLocale, Locale locale) argument
442 addLikelySubtags(Locale locale) argument
450 addLikelySubtags(String locale) argument
457 getScript(String locale) argument
[all...]
/libcore/ojluni/src/main/java/java/time/format/
H A DZoneName.java36 * appropriate zone id for the particular locale.
43 public static String toZid(String zid, Locale locale) { argument
45 TimeZoneNames tzNames = TimeZoneNames.getInstance(locale);
48 ULocale uLocale = ULocale.forLocale(locale);
H A DDecimalStyle.java118 * The locale 'en_US' will always be present.
131 * {@link java.util.Locale.Category#FORMAT FORMAT} locale.
133 * This method provides access to locale sensitive decimal style symbols.
147 * Obtains the DecimalStyle for the specified locale.
149 * This method provides access to locale sensitive decimal style symbols.
151 * @param locale the locale, not null
154 public static DecimalStyle of(Locale locale) { argument
155 Objects.requireNonNull(locale, "locale");
165 create(Locale locale) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/
H A DOldAndroidLocaleTest.java29 * Test some locale-dependent stuff for Android. This test mainly ensures that
36 Locale locale = new Locale("en");
37 assertEquals("en", locale.toString());
39 locale = new Locale("en", "US");
40 assertEquals("en_US", locale.toString());
42 locale = new Locale("en", "", "POSIX");
43 assertEquals("en__POSIX", locale.toString());
45 locale = new Locale("en", "US", "POSIX");
46 assertEquals("en_US_POSIX", locale.toString());
/libcore/metrictests/memory/apps/src/libcore/heapdumper/
H A DActions.java39 * Uses a collator for the root locale to trivially sort some strings.
49 * Uses a collator for the US English locale to trivially sort some strings.
59 * Uses a collator for the Korean locale to trivially sort some strings.
70 private static void useCollatorForLocale(Locale locale) { argument
72 Collator collator = Collator.getInstance(locale);
/libcore/ojluni/src/main/java/sun/util/locale/provider/
H A DCalendarDataUtility.java26 package sun.util.locale.provider;
75 Locale locale) {
99 String[] names = getNames(id, field, style, locale);
107 Locale locale) {
109 return retrieveFieldValueName(id, field, value, style, locale);
113 Locale locale) {
117 names = retrieveFieldValueNamesImpl(id, field, SHORT_FORMAT, locale);
119 names.putAll(retrieveFieldValueNamesImpl(id, field, st, locale));
123 names = retrieveFieldValueNamesImpl(id, field, style, locale);
129 int style, Locale locale) {
74 retrieveFieldValueName(String id, int field, int value, int style, Locale locale) argument
106 retrieveJavaTimeFieldValueName(String id, int field, int value, int style, Locale locale) argument
112 retrieveFieldValueNames(String id, int field, int style, Locale locale) argument
128 retrieveJavaTimeFieldValueNames(String id, int field, int style, Locale locale) argument
149 retrieveFieldValueNamesImpl(String id, int field, int style, Locale locale) argument
185 getNames(String id, int field, int style, Locale locale) argument
212 getDateFormatSymbols(String id, Locale locale) argument
[all...]
/libcore/luni/src/test/java/libcore/java/text/
H A DDecimalFormatTest.java170 private void assertDecFmtWithMultiplierAndFractionByLocale(String value, int multiplier, int fraction, Locale locale, String expectedResult) { argument
171 DecimalFormat df = (DecimalFormat)NumberFormat.getIntegerInstance(locale);
293 // Confirm the currency symbol used by a format is determined by the locale of the format
316 // format's locale.
333 private String formatArbitraryCurrencyAmountInLocale(Currency currency, Locale locale) { argument
334 NumberFormat localeCurrencyFormat = NumberFormat.getCurrencyInstance(locale);
347 Locale locale = new Locale("de", "AT");
349 new android.icu.text.DecimalFormatSymbols(locale);
354 DecimalFormatSymbols dfs = new DecimalFormatSymbols(locale);
383 Locale locale;
558 createDecimalFormatInstances(Locale locale, String pattern) argument
[all...]
/libcore/luni/src/test/java/libcore/libcore/icu/
H A DICULocaleDataTest.java45 for (ULocale locale : ULocale.getAvailableLocales()) {
46 LocaleData localeData = LocaleData.getInstance(locale);
50 assertNotNull("Delimiter is null in this locale " + locale, delimiter);
51 assertFalse("Delimiter is empty in this locale " + locale, delimiter.isEmpty());
/libcore/ojluni/src/main/java/sun/util/locale/
H A DLocaleSyntaxException.java32 package sun.util.locale;
H A DParseStatus.java32 package sun.util.locale;
H A DExtension.java32 package sun.util.locale;
/libcore/ojluni/src/main/java/java/util/
H A DCurrency.java108 * given locale. The language and variant components of the locale
118 * @param locale the locale for whose country a <code>Currency</code>
121 * locale, or {@code null}
122 * @exception NullPointerException if <code>locale</code> or its country
124 * @exception IllegalArgumentException if the country of the given {@code locale}
127 public static Currency getInstance(Locale locale) { argument
130 android.icu.util.Currency.getInstance(locale);
131 String variant = locale
220 getSymbol(Locale locale) argument
288 getDisplayName(Locale locale) argument
[all...]
H A DResourceBundle.java64 import sun.util.locale.BaseLocale;
65 import sun.util.locale.LocaleObjectCache;
71 * Resource bundles contain locale-specific objects. When your program needs a
72 * locale-specific resource, a <code>String</code> for example, your program can
74 * locale. In this way, you can write program code that is largely independent
75 * of the user's locale isolating most, if not all, of the locale-specific
93 * specific locale is not supported. The family can then provide as
94 * many locale-specific members as needed, for example a German one
99 * been translated for the locale represente
340 private Locale locale = null; field in class:ResourceBundle
541 private Locale locale; field in class:ResourceBundle.CacheKey
565 CacheKey(String baseName, Locale locale, ClassLoader loader) argument
592 setLocale(Locale locale) argument
844 getBundle(String baseName, Locale locale) argument
1077 getBundle(String baseName, Locale locale, ClassLoader loader) argument
1308 getBundleImpl(String baseName, Locale locale, ClassLoader loader, Control control) argument
1550 throwMissingResourceException(String baseName, Locale locale, Throwable cause) argument
2359 getCandidateLocales(String baseName, Locale locale) argument
2523 getFallbackLocale(String baseName, Locale locale) argument
2627 newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) argument
2743 getTimeToLive(String baseName, Locale locale) argument
2798 needsReload(String baseName, Locale locale, String format, ClassLoader loader, ResourceBundle bundle, long loadTime) argument
2884 toBundleName(String baseName, Locale locale) argument
2992 getFallbackLocale(String baseName, Locale locale) argument
[all...]
/libcore/ojluni/src/main/java/java/time/temporal/
H A DTemporalField.java97 * Gets the display name for the field in the requested locale.
99 * If there is no display name for the locale then a suitable default must be returned.
101 * The default implementation must check the locale is not null
104 * @param locale the locale to use, not null
105 * @return the display name for the locale or a suitable default, not null
107 default String getDisplayName(Locale locale) { argument
108 Objects.requireNonNull(locale, "locale");
/libcore/luni/src/main/java/org/xml/sax/
H A DParser.java57 * Allow an application to request a locale for errors and warnings.
60 * and warnings; if they cannot support the requested locale,
62 * not request a locale change in the middle of a parse.</p>
64 * @param locale A Java Locale object.
66 * (using the previous or default locale) if the
67 * requested locale is not supported.
71 public abstract void setLocale (Locale locale) argument

Completed in 437 milliseconds

12345