Java Code Examples for libcore.icu.ICU#getAvailableLocales()
The following examples show how to use
libcore.icu.ICU#getAvailableLocales() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ICUTest.java From j2objc with Apache License 2.0 | 4 votes |
public void test_getAvailableLocales() throws Exception { // Check that corrupting our array doesn't affect other callers. assertNotNull(ICU.getAvailableLocales()[0]); ICU.getAvailableLocales()[0] = null; assertNotNull(ICU.getAvailableLocales()[0]); }
Example 2
Source File: DecimalFormatSymbols.java From j2objc with Apache License 2.0 | 2 votes |
/** * Returns an array of all locales for which the * <code>getInstance</code> methods of this class can return * localized instances. * * @return an array of locales for which localized * <code>DecimalFormatSymbols</code> instances are available. * @since 1.6 */ public static Locale[] getAvailableLocales() { // Android-changed: Removed used of DecimalFormatSymbolsProvider. Switched to use ICU. return ICU.getAvailableLocales(); }
Example 3
Source File: Collator.java From j2objc with Apache License 2.0 | 2 votes |
/** * Returns an array of locales for which custom {@code Collator} instances * are available. * <p>Note that Android does not support user-supplied locale service providers. */ public static Locale[] getAvailableLocales() { return ICU.getAvailableLocales(); }
Example 4
Source File: Locale.java From j2objc with Apache License 2.0 | 2 votes |
/** * Returns an array of all installed locales. * The returned array represents the union of locales supported * by the Java runtime environment and by installed * {@link java.util.spi.LocaleServiceProvider LocaleServiceProvider} * implementations. It must contain at least a <code>Locale</code> * instance equal to {@link java.util.Locale#US Locale.US}. * * @return An array of installed locales. */ public static Locale[] getAvailableLocales() { // J2ObjC changed: Switched to use ICU. (Android has the same change at master) return ICU.getAvailableLocales(); }