Uses of Class
com.ibm.icu.util.ULocale
-
Packages that use ULocale Package Description com.ibm.icu.impl com.ibm.icu.impl.coll com.ibm.icu.impl.duration com.ibm.icu.impl.icuadapter com.ibm.icu.impl.javaspi This package includes Java Locale Service Provider implementation.com.ibm.icu.impl.locale com.ibm.icu.impl.number com.ibm.icu.impl.number.parse com.ibm.icu.impl.number.range com.ibm.icu.impl.text com.ibm.icu.impl.units com.ibm.icu.lang Enhanced character property and surrogate support.com.ibm.icu.number Library for localized number formatting introduced in ICU 60; for usage, see com.ibm.icu.number.NumberFormatter.com.ibm.icu.text Extensions and enhancements to java.text to support unicode transforms, UnicodeSet, surrogate char utilities, UCA collation, normalization, break iteration (rule and dictionary based), enhanced number format, international string searching, and arabic shaping.com.ibm.icu.util International calendars and other utility classes. -
-
Uses of ULocale in com.ibm.icu.impl
Fields in com.ibm.icu.impl declared as ULocale Modifier and Type Field Description private ULocale
TimeZoneGenericNames. _locale
private ULocale
TZDBTimeZoneNames. _locale
private ULocale
ICULocaleService. fallbackLocale
(package private) ULocale
RelativeDateFormat. fLocale
(package private) ULocale
ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo. locale
private ULocale
ICUService.LocaleRef. locale
private ULocale
LocaleDisplayNamesImpl.Cache. locale
private ULocale
LocaleDisplayNamesImpl. locale
(package private) ULocale
ICUResourceBundle.WholeBundle. ulocale
Fields in com.ibm.icu.impl with type parameters of type ULocale Modifier and Type Field Description private static SimpleCache<ULocale,char[]>
DateNumberFormat. CACHE
private java.util.Map<java.lang.String,ULocale>
PluralRulesLoader. rulesIdToEquivalentULocale
Methods in com.ibm.icu.impl that return ULocale Modifier and Type Method Description ULocale
ICULocaleService.LocaleKey. canonicalLocale()
Convenience method to return the locale corresponding to the (canonical) original ID.ULocale
ICULocaleService.LocaleKey. currentLocale()
Convenience method to return the ulocale corresponding to the (canonical) currentID.ULocale[]
ICULocaleService. getAvailableULocales()
Convenience method for callers using locales.static ULocale[]
ICUResourceBundle. getAvailableULocales()
Get the set of ULocales installed the base bundle.static ULocale[]
ICUResourceBundle. getAvailableULocales(ULocale.AvailableType type)
Get the set of ULocales installed the base bundle, for the specified type.static ULocale[]
ICUResourceBundle. getAvailableULocales(java.lang.String baseName, java.lang.ClassLoader loader)
Get the set of Locales installed in the specified bundles.static ULocale[]
ICUResourceBundle. getAvailableULocales(java.lang.String baseName, java.lang.ClassLoader loader, ULocale.AvailableType type)
Get the set of Locales installed in the specified bundles, for the specified type.ULocale[]
PluralRulesLoader. getAvailableULocales()
Returns the locales for which we have plurals data.static ULocale
ICUResourceBundle. getFunctionalEquivalent(java.lang.String baseName, java.lang.ClassLoader loader, java.lang.String resName, java.lang.String keyword, ULocale locID, boolean[] isAvailable, boolean omitDefault)
Returns a functionally equivalent locale, considering keywords as well, for the specified keyword.ULocale
PluralRulesLoader. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
Returns the functionally equivalent locale.(package private) ULocale
LocaleDisplayNamesImpl.DataTable. getLocale()
ULocale
LocaleDisplayNamesImpl. getLocale()
ULocale
LocaleDisplayNamesImpl.ICUDataTable. getLocale()
ULocale
CurrencyData.DefaultInfo. getULocale()
ULocale
ICUCurrencyDisplayInfoProvider.ICUCurrencyDisplayInfo. getULocale()
ULocale
ICUResourceBundle. getULocale()
ULocale
ResourceBundleWrapper. getULocale()
(package private) ULocale[]
ICUResourceBundle.AvailEntry. getULocaleList(ULocale.AvailableType type)
Methods in com.ibm.icu.impl that return types with arguments of type ULocale Modifier and Type Method Description private java.util.Map<java.lang.String,ULocale>
PluralRulesLoader. getRulesIdToEquivalentULocaleMap()
Returns the lazily-constructed map.Methods in com.ibm.icu.impl with parameters of type ULocale Modifier and Type Method Description protected TimeZoneGenericNames
TimeZoneGenericNames.Cache. createInstance(java.lang.String key, ULocale data)
ICUService.Key
ICULocaleService. createKey(ULocale l, int kind)
static ICULocaleService.LocaleKey
ICULocaleService.LocaleKey. createWithCanonical(ULocale locale, java.lang.String canonicalFallbackID, int kind)
Create a LocaleKey with canonical primary and fallback IDs.PluralRules
PluralRulesLoader. forLocale(ULocale locale, PluralRules.PluralType type)
Returns the plural rules for the the locale.java.lang.Object
ICULocaleService. get(ULocale locale)
Convenience override for callers using locales.java.lang.Object
ICULocaleService. get(ULocale locale, int kind)
Convenience override for callers using locales.java.lang.Object
ICULocaleService. get(ULocale locale, int kind, ULocale[] actualReturn)
Convenience override for callers using locales.java.lang.Object
ICULocaleService. get(ULocale locale, ULocale[] actualReturn)
Convenience override for callers using locales.(package private) java.util.SortedMap<java.lang.String,java.lang.String>
ICUService.LocaleRef. get(ULocale loc, java.util.Comparator<java.lang.Object> comp)
LocaleDisplayNames
LocaleDisplayNamesImpl.Cache. get(ULocale locale, DisplayContext... contexts)
LocaleDisplayNames
LocaleDisplayNamesImpl.Cache. get(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
abstract LocaleDisplayNamesImpl.DataTable
LocaleDisplayNamesImpl.DataTables. get(ULocale locale, boolean nullIfNotFound)
LocaleDisplayNamesImpl.DataTable
LocaleDisplayNamesImpl.ICUDataTables. get(ULocale locale, boolean nullIfNotFound)
static ICUResourceBundle
ICUResourceBundle. getBundleInstance(java.lang.String baseName, ULocale locale, ICUResourceBundle.OpenType openType)
static java.lang.String
CalendarUtil. getCalendarType(ULocale loc)
Returns a calendar type for the given locale.static int
UCaseProps. getCaseLocale(ULocale locale)
java.lang.String
ICULocaleService.LocaleKeyFactory. getDisplayName(java.lang.String id, ULocale locale)
Return a localized name for the locale represented by id.java.lang.String
ICUService.Factory. getDisplayName(java.lang.String id, ULocale locale)
Return the display name for this id in the provided locale.java.lang.String
ICUService. getDisplayName(java.lang.String id, ULocale locale)
Given a visible id, return the display name in the requested locale.java.lang.String
ICUService.SimpleFactory. getDisplayName(java.lang.String identifier, ULocale locale)
If this.id equals id, returns id regardless of locale, otherwise returns null.java.util.SortedMap<java.lang.String,java.lang.String>
ICUService. getDisplayNames(ULocale locale)
Convenience override of getDisplayNames(ULocale, Comparator, String) that uses null for the comparator, and null for the matchID.java.util.SortedMap<java.lang.String,java.lang.String>
ICUService. getDisplayNames(ULocale locale, java.lang.String matchID)
Convenience override of getDisplayNames(ULocale, Comparator, String) that uses null for the comparator.java.util.SortedMap<java.lang.String,java.lang.String>
ICUService. getDisplayNames(ULocale locale, java.util.Comparator<java.lang.Object> com)
Convenience override of getDisplayNames(ULocale, Comparator, String) that uses null for the matchID, thus returning all display names.java.util.SortedMap<java.lang.String,java.lang.String>
ICUService. getDisplayNames(ULocale locale, java.util.Comparator<java.lang.Object> com, java.lang.String matchID)
Return a snapshot of the mapping from display names to visible IDs for this service.static ULocale
ICUResourceBundle. getFunctionalEquivalent(java.lang.String baseName, java.lang.ClassLoader loader, java.lang.String resName, java.lang.String keyword, ULocale locID, boolean[] isAvailable, boolean omitDefault)
Returns a functionally equivalent locale, considering keywords as well, for the specified keyword.ULocale
PluralRulesLoader. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
Returns the functionally equivalent locale.CurrencyData.CurrencyDisplayInfo
CurrencyData.CurrencyDisplayInfoProvider. getInstance(ULocale locale, boolean withFallback)
static DayPeriodRules
DayPeriodRules. getInstance(ULocale locale)
Get a DayPeriodRules object given a locale.CurrencyData.CurrencyDisplayInfo
ICUCurrencyDisplayInfoProvider. getInstance(ULocale locale, boolean withFallback)
static LocaleDisplayNames
LocaleDisplayNamesImpl. getInstance(ULocale locale, DisplayContext... contexts)
static LocaleDisplayNames
LocaleDisplayNamesImpl. getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
static TimeZoneGenericNames
TimeZoneGenericNames. getInstance(ULocale locale)
The factory method ofTimeZoneGenericNames
.static java.util.Locale[]
ICUResourceBundle. getLocaleList(ULocale[] ulocales)
Convert a list of ULocales to a list of Locales.PluralRules
PluralRulesLoader. getOrCreateRulesForLocale(ULocale locale, PluralRules.PluralType type)
Gets the rule from the rulesId.java.lang.String
PluralRulesLoader. getRulesIdForLocale(ULocale locale, PluralRules.PluralType type)
Gets the rulesId from the locale,with locale fallback.static java.lang.String
ICUResourceTableAccess. getTableString(java.lang.String path, ULocale locale, java.lang.String tableName, java.lang.String itemName, java.lang.String defaultValue)
Utility to fetch locale display data from resource bundle tables.TimeZoneNames
TimeZoneNamesFactoryImpl. getTimeZoneNames(ULocale locale)
static BreakIterator
CaseMapImpl. getTitleBreakIterator(ULocale locale, int options, BreakIterator iter)
protected java.lang.Object
ICULocaleService.ICUResourceBundleFactory. handleCreate(ULocale loc, int kind, ICUService service)
Create the service.protected java.lang.Object
ICULocaleService.LocaleKeyFactory. handleCreate(ULocale loc, int kind, ICUService service)
Utility method used by create(Key, ICUService).boolean
PluralRulesLoader. hasOverride(ULocale locale)
private void
RelativeDateFormat. initCapitalizationContextInfo(ULocale locale)
Set capitalizationOfRelativeUnitsForListOrMenu, capitalizationOfRelativeUnitsForStandAloneprivate void
DateNumberFormat. initialize(ULocale loc, java.lang.String digitString, java.lang.String nsName)
private void
TimeZoneNamesImpl. initialize(ULocale locale)
Initialize the transient fields, called from the constructor and readObject.private Calendar
RelativeDateFormat. initializeCalendar(TimeZone zone, ULocale locale)
initializes fCalendar from parameters.private MessageFormat
RelativeDateFormat. initializeCombinedFormat(Calendar cal, ULocale locale)
java.lang.String
LocaleDisplayNamesImpl. localeDisplayName(ULocale locale)
private java.lang.String
LocaleDisplayNamesImpl. localeDisplayNameInternal(ULocale locale)
private LocaleDisplayNames.UiListItem
LocaleDisplayNamesImpl. newRow(ULocale modified, DisplayContext capContext)
ICUService.Factory
ICULocaleService. registerObject(java.lang.Object obj, ULocale locale)
Convenience override for callers using locales.ICUService.Factory
ICULocaleService. registerObject(java.lang.Object obj, ULocale locale, boolean visible)
Convenience override for callers using locales.ICUService.Factory
ICULocaleService. registerObject(java.lang.Object obj, ULocale locale, int kind)
Convenience function for callers using locales.ICUService.Factory
ICULocaleService. registerObject(java.lang.Object obj, ULocale locale, int kind, boolean visible)
Convenience function for callers using locales.private static java.lang.String
LocaleDisplayNamesImpl. toTitleWholeStringNoLowercase(ULocale locale, java.lang.String s)
Method parameters in com.ibm.icu.impl with type arguments of type ULocale Modifier and Type Method Description java.util.List<LocaleDisplayNames.UiListItem>
LocaleDisplayNamesImpl. getUiListCompareWholeItems(java.util.Set<ULocale> localeSet, java.util.Comparator<LocaleDisplayNames.UiListItem> comparator)
Constructors in com.ibm.icu.impl with parameters of type ULocale Constructor Description Builder(ULocale loc)
Create SimpleFilteredBreakIteratorBuilder using given localeDateNumberFormat(ULocale loc, char zeroDigit, java.lang.String nsName)
DateNumberFormat(ULocale loc, java.lang.String digitString, java.lang.String nsName)
ICUCurrencyDisplayInfo(ULocale locale, ICUResourceBundle rb, boolean fallback)
ICUDataTable(java.lang.String path, ULocale locale, boolean nullIfNotFound)
LocaleDisplayNamesImpl(ULocale locale, DisplayContext... contexts)
LocaleDisplayNamesImpl(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
LocaleRef(java.util.SortedMap<java.lang.String,java.lang.String> dnCache, ULocale locale, java.util.Comparator<java.lang.Object> com)
RelativeDateFormat(int timeStyle, int dateStyle, ULocale locale, Calendar cal)
SimpleLocaleKeyFactory(java.lang.Object obj, ULocale locale, int kind, boolean visible)
SimpleLocaleKeyFactory(java.lang.Object obj, ULocale locale, int kind, boolean visible, java.lang.String name)
TimeZoneGenericNames(ULocale locale)
Constructs aTimeZoneGenericNames
with the given locale.TimeZoneGenericNames(ULocale locale, TimeZoneNames tznames)
Constructs aTimeZoneGenericNames
with the given locale and theTimeZoneNames
.TimeZoneNamesImpl(ULocale locale)
TZDBTimeZoneNames(ULocale loc)
-
Uses of ULocale in com.ibm.icu.impl.coll
Fields in com.ibm.icu.impl.coll declared as ULocale Modifier and Type Field Description ULocale
CollationTailoring. actualLocale
Methods in com.ibm.icu.impl.coll with parameters of type ULocale Modifier and Type Method Description (package private) static java.lang.String
CollationLoader. loadRules(ULocale locale, java.lang.String collationType)
static CollationTailoring
CollationLoader. loadTailoring(ULocale locale, Output<ULocale> outValidLocale)
Method parameters in com.ibm.icu.impl.coll with type arguments of type ULocale Modifier and Type Method Description static CollationTailoring
CollationLoader. loadTailoring(ULocale locale, Output<ULocale> outValidLocale)
-
Uses of ULocale in com.ibm.icu.impl.duration
Methods in com.ibm.icu.impl.duration with parameters of type ULocale Modifier and Type Method Description static BasicDurationFormat
BasicDurationFormat. getInstance(ULocale locale)
Constructors in com.ibm.icu.impl.duration with parameters of type ULocale Constructor Description BasicDurationFormat(ULocale locale)
-
Uses of ULocale in com.ibm.icu.impl.icuadapter
Methods in com.ibm.icu.impl.icuadapter with parameters of type ULocale Modifier and Type Method Description java.lang.String
TimeZoneJDK. getDisplayName(boolean daylight, int style, ULocale locale)
-
Uses of ULocale in com.ibm.icu.impl.javaspi
Methods in com.ibm.icu.impl.javaspi that return ULocale Modifier and Type Method Description static ULocale
ICULocaleServiceProvider. toULocaleNoSpecialVariant(java.util.Locale locale)
Methods in com.ibm.icu.impl.javaspi with parameters of type ULocale Modifier and Type Method Description private static void
ICULocaleServiceProvider. addULocale(ULocale uloc, java.util.Set<java.util.Locale> locales)
-
Uses of ULocale in com.ibm.icu.impl.locale
Methods in com.ibm.icu.impl.locale that return ULocale Modifier and Type Method Description ULocale
LikelySubtags. canonicalize(ULocale locale)
Implementation of LocaleMatcher.canonicalize(ULocale).Methods in com.ibm.icu.impl.locale with parameters of type ULocale Modifier and Type Method Description ULocale
LikelySubtags. canonicalize(ULocale locale)
Implementation of LocaleMatcher.canonicalize(ULocale).private boolean
LocaleValidityChecker. isSubdivision(ULocale locale, java.lang.String subtag)
boolean
LocaleValidityChecker. isValid(ULocale locale, LocaleValidityChecker.Where where)
private boolean
LocaleValidityChecker. isValidU(ULocale locale, ValidIdentifiers.Datatype datatype, java.lang.String extensionString, LocaleValidityChecker.Where where)
LSR
LikelySubtags. makeMaximizedLsrFrom(ULocale locale, boolean returnInputIfUnmatch)
int
LocaleDistance. testOnlyDistance(ULocale desired, ULocale supported, int threshold, LocaleMatcher.FavorSubtag favorSubtag)
-
Uses of ULocale in com.ibm.icu.impl.number
Fields in com.ibm.icu.impl.number declared as ULocale Modifier and Type Field Description ULocale
MacroProps. loc
private ULocale
LocalizedNumberFormatterAsFormat. locale
Methods in com.ibm.icu.impl.number with parameters of type ULocale Modifier and Type Method Description private static java.lang.String
LongNameHandler. calculateGenderForUnit(ULocale locale, MeasureUnit unit)
Calculates the gender of an arbitrary unit: this is the *second* implementation of an algorithm to do this: Gender is also calculated in "processPatternTimes": that code path is "bottom up", loading the gender for every component of a compound unit (at the same time as loading the Long Names formatting patterns), even if the gender is unneeded, then combining the single units' genders into the compound unit's gender, according to the rules.private static LongNameHandler
LongNameHandler. forArbitraryUnit(ULocale loc, MeasureUnit unit, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
static LongNameHandler
LongNameHandler. forCurrencyLongNames(ULocale locale, Currency currency, PluralRules rules, MicroPropsGenerator parent)
static LongNameHandler
LongNameHandler. forMeasureUnit(ULocale locale, MeasureUnit unit, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
Construct a localized LongNameHandler for the specified MeasureUnit.static MixedUnitLongNameHandler
MixedUnitLongNameHandler. forMeasureUnit(ULocale locale, MeasureUnit mixedUnit, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
Construct a localized MixedUnitLongNameHandler for the specified MeasureUnit.static LongNameMultiplexer
LongNameMultiplexer. forMeasureUnits(ULocale locale, java.util.List<MeasureUnit> units, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, PluralRules rules, MicroPropsGenerator parent)
private static java.lang.String
LongNameHandler. getCompoundValue(java.lang.String compoundKey, ULocale locale, NumberFormatter.UnitWidth width)
private static void
LongNameHandler. getCurrencyLongNameData(ULocale locale, Currency currency, java.lang.String[] outArray)
private static java.lang.String
LongNameHandler. getDeriveCompoundRule(ULocale locale, java.lang.String feature, java.lang.String structure)
Loads and returns the value in rules that look like these:Currently a fake example, but spec compliant: NOTE: If U_FAILURE(status), returns an empty string. private static java.lang.String
LongNameHandler. getDerivedGender(ULocale locale, java.lang.String structure, java.lang.String[] data0, java.lang.String[] data1)
private static java.lang.String
LongNameHandler. getGenderForBuiltin(ULocale locale, MeasureUnit builtinUnit)
(package private) static void
LongNameHandler. getInflectedMeasureData(java.lang.String subKey, ULocale locale, NumberFormatter.UnitWidth width, java.lang.String gender, java.lang.String caseVariant, java.lang.String[] outArray)
(package private) static void
LongNameHandler. getMeasureData(ULocale locale, MeasureUnit unit, NumberFormatter.UnitWidth width, java.lang.String unitDisplayCase, java.lang.String[] outArray)
private static short
Grouper. getMinGroupingForLocale(ULocale locale)
java.lang.String
CustomSymbolCurrency. getName(ULocale locale, int nameStyle, boolean[] isChoiceFormat)
java.lang.String
CustomSymbolCurrency. getName(ULocale locale, int nameStyle, java.lang.String pluralCount, boolean[] isChoiceFormat)
static java.lang.String
LongNameHandler. getUnitDisplayName(ULocale locale, MeasureUnit unit, NumberFormatter.UnitWidth width)
private static void
LongNameHandler. maybeCalculateGender(ULocale locale, MeasureUnit unit, java.lang.String[] outArray)
void
CompactData. populate(ULocale locale, java.lang.String nsName, CompactDecimalFormat.CompactStyle compactStyle, CompactData.CompactType compactType)
private static void
LongNameHandler. processPatternTimes(MeasureUnitImpl productUnit, ULocale loc, NumberFormatter.UnitWidth width, java.lang.String caseVariant, java.lang.String[] outArray)
Roughly corresponds to patternTimes(...) in the spec: https://unicode.org/reports/tr35/tr35-general.html#compound-unitsstatic Currency
CustomSymbolCurrency. resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols)
Grouper
Grouper. withLocaleData(ULocale locale, PatternStringParser.ParsedPatternInfo patternInfo)
Constructors in com.ibm.icu.impl.number with parameters of type ULocale Constructor Description DerivedComponents(ULocale locale, java.lang.String feature, java.lang.String structure)
Constructor.LocalizedNumberFormatterAsFormat(LocalizedNumberFormatter formatter, ULocale locale)
UsagePrefsHandler(ULocale locale, MeasureUnit inputUnit, java.lang.String usage, MicroPropsGenerator parent)
-
Uses of ULocale in com.ibm.icu.impl.number.parse
Fields in com.ibm.icu.impl.number.parse declared as ULocale Modifier and Type Field Description ULocale
AffixTokenMatcherFactory. locale
Methods in com.ibm.icu.impl.number.parse with parameters of type ULocale Modifier and Type Method Description static NumberParserImpl
NumberParserImpl. createDefaultParserForLocale(ULocale loc)
static NumberParserImpl
NumberParserImpl. createSimpleParser(ULocale locale, java.lang.String pattern, int parseFlags)
Creates a parser with most default options. -
Uses of ULocale in com.ibm.icu.impl.number.range
Fields in com.ibm.icu.impl.number.range declared as ULocale Modifier and Type Field Description ULocale
RangeMacroProps. loc
Methods in com.ibm.icu.impl.number.range with parameters of type ULocale Modifier and Type Method Description static StandardPluralRanges
StandardPluralRanges. forLocale(ULocale locale)
Create a StandardPluralRanges based on locale.static java.lang.String
StandardPluralRanges. getSetForLocale(ULocale locale)
Get the set name from the locale. -
Uses of ULocale in com.ibm.icu.impl.text
Methods in com.ibm.icu.impl.text with parameters of type ULocale Modifier and Type Method Description protected RbnfLenientScanner
RbnfScannerProviderImpl. createScanner(ULocale locale, java.lang.String extras)
Deprecated.This API is ICU internal only.RbnfLenientScanner
RbnfScannerProviderImpl. get(ULocale locale, java.lang.String extras)
Deprecated.This API is ICU internal only. -
Uses of ULocale in com.ibm.icu.impl.units
Methods in com.ibm.icu.impl.units with parameters of type ULocale Modifier and Type Method Description UnitPreferences.UnitPreference[]
UnitPreferences. getPreferencesFor(java.lang.String category, java.lang.String usage, ULocale locale, UnitsData data)
UnitPreferences.UnitPreference[]
UnitsData. getPreferencesFor(java.lang.String category, java.lang.String usage, ULocale locale)
Constructors in com.ibm.icu.impl.units with parameters of type ULocale Constructor Description UnitsRouter(MeasureUnitImpl inputUnit, ULocale locale, java.lang.String usage)
UnitsRouter(java.lang.String inputUnitIdentifier, ULocale locale, java.lang.String usage)
-
Uses of ULocale in com.ibm.icu.lang
Methods in com.ibm.icu.lang with parameters of type ULocale Modifier and Type Method Description private static int[]
UScript. findCodeFromLocale(ULocale locale)
Helper function to find the code from locale.private static int
UCharacter. getCaseLocale(ULocale locale)
static int[]
UScript. getCode(ULocale locale)
Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.private static int[]
UScript. getCodesFromLocale(ULocale locale)
static java.lang.String
UCharacter. toLowerCase(ULocale locale, java.lang.String str)
Returns the lowercase version of the argument string.static java.lang.String
UCharacter. toTitleCase(ULocale locale, java.lang.String str, BreakIterator titleIter)
Returns the titlecase version of the argument string.static java.lang.String
UCharacter. toTitleCase(ULocale locale, java.lang.String str, BreakIterator titleIter, int options)
Returns the titlecase version of the argument string.static java.lang.String
UCharacter. toUpperCase(ULocale locale, java.lang.String str)
Returns the uppercase version of the argument string. -
Uses of ULocale in com.ibm.icu.number
Methods in com.ibm.icu.number with parameters of type ULocale Modifier and Type Method Description private static void
NumberRangeFormatterImpl. getNumberRangeData(ULocale locale, java.lang.String nsName, NumberRangeFormatterImpl out)
LocalizedNumberFormatter
UnlocalizedNumberFormatter. locale(ULocale locale)
ULocale version of theUnlocalizedNumberFormatter.locale(Locale)
setter above.LocalizedNumberRangeFormatter
UnlocalizedNumberRangeFormatter. locale(ULocale locale)
ULocale version of theUnlocalizedNumberRangeFormatter.locale(Locale)
setter above.static LocalizedNumberFormatter
NumberFormatter. withLocale(ULocale locale)
Call this method at the beginning of a NumberFormatter fluent chain in which the locale is known at the call site.static LocalizedNumberRangeFormatter
NumberRangeFormatter. withLocale(ULocale locale)
Call this method at the beginning of a NumberRangeFormatter fluent chain in which the locale is known at the call site.(package private) MicroPropsGenerator
CompactNotation. withLocaleData(ULocale locale, java.lang.String nsName, CompactData.CompactType compactType, PluralRules rules, MutablePatternModifier buildReference, boolean safe, MicroPropsGenerator parent)
Constructors in com.ibm.icu.number with parameters of type ULocale Constructor Description CompactHandler(CompactNotation notation, ULocale locale, java.lang.String nsName, CompactData.CompactType compactType, PluralRules rules, MutablePatternModifier buildReference, boolean safe, MicroPropsGenerator parent)
-
Uses of ULocale in com.ibm.icu.text
Fields in com.ibm.icu.text declared as ULocale Modifier and Type Field Description private ULocale
TimeZoneFormat. _locale
private ULocale
BreakIterator. actualLocale
The locale containing data used to construct this object, or null.private ULocale
DateFormatSymbols. actualLocale
The locale containing data used to construct this object, or null.private ULocale
DecimalFormatSymbols. actualLocale
The locale containing data used to construct this object, or null.private ULocale
UFormat. actualLocale
The locale containing data used to construct this object, or null.private static ULocale
SimpleDateFormat. cachedDefaultLocale
private ULocale
ListFormatter. locale
private ULocale
LocaleDisplayNames.LastResortLocaleDisplayNames. locale
private ULocale
LowercaseTransliterator. locale
private ULocale
MeasureFormat.MeasureProxy. locale
ULocale
NumberingSystem.LocaleLookupData. locale
private ULocale
RelativeDateTimeFormatter. locale
private ULocale
RuleBasedNumberFormat. locale
The formatter's locale.private ULocale
SimpleDateFormat. locale
private ULocale
TimeUnitFormat. locale
Deprecated.(package private) ULocale
TimeUnitFormat.TimeUnitFormatSetupSink. locale
private ULocale
TitlecaseTransliterator. locale
private ULocale
UppercaseTransliterator. locale
ULocale
LocaleDisplayNames.UiListItem. minimized
Returns the minimized locale for an input locale, such as sr-Cyrl → srULocale
LocaleDisplayNames.UiListItem. modified
Returns the modified locale for an input locale, such as sr → sr-Cyrl, where there is also an sr-Latn in the listprivate ULocale
DateFormatSymbols. requestedLocale
private ULocale
CurrencyPluralInfo. ulocale
private ULocale
DecimalFormatSymbols. ulocale
The requested ULocale.private ULocale
MessageFormat. ulocale
The locale to use for formatting numbers and dates.private ULocale
PluralFormat. ulocale
The locale used for standard number formatting and getting the predefined plural rules (if they were not defined explicitely).private ULocale
RelativeDateTimeFormatter.Loader. ulocale
private ULocale
BreakIterator. validLocale
The most specific locale containing any resource data, or null.private ULocale
DateFormatSymbols. validLocale
The most specific locale containing any resource data, or null.(package private) ULocale
DecimalFormatSymbols.CacheData. validLocale
private ULocale
DecimalFormatSymbols. validLocale
The most specific locale containing any resource data, or null.private ULocale
RuleBasedCollator. validLocale
private ULocale
UFormat. validLocale
The most specific locale containing any resource data, or null.private ULocale
BreakIterator.BreakIteratorCache. where
Fields in com.ibm.icu.text with type parameters of type ULocale Modifier and Type Field Description private CacheBase<java.lang.String,RelativeDateTimeFormatter.RelativeDateTimeFormatterData,ULocale>
RelativeDateTimeFormatter.Cache. cache
private static CacheBase<ULocale,DecimalFormatSymbols.CacheData,java.lang.Void>
DecimalFormatSymbols. cachedLocaleData
cache to hold the NumberElements of a Locale.private static CacheBase<java.lang.String,DateFormatSymbols,ULocale>
DateFormatSymbols. DFSCACHE
(package private) java.util.Set<ULocale>
SpoofChecker.Builder. fAllowedLocales
private java.util.Set<ULocale>
SpoofChecker. fAllowedLocales
private static java.util.Map<ULocale,java.lang.String>
MeasureFormat. localeIdToRangeFormat
private static SimpleCache<ULocale,MeasureFormat.NumericFormatters>
MeasureFormat. localeToNumericDurationFormatters
Methods in com.ibm.icu.text that return ULocale Modifier and Type Method Description abstract ULocale[]
BreakIterator.BreakIteratorServiceShim. getAvailableULocales()
static ULocale[]
BreakIterator. getAvailableULocales()
Returns a list of locales for which BreakIterators can be used.ULocale[]
BreakIteratorFactory. getAvailableULocales()
static ULocale[]
Collator. getAvailableULocales()
Returns the set of locales, as ULocale objects, for which collators are installed.(package private) abstract ULocale[]
Collator.ServiceShim. getAvailableULocales()
(package private) ULocale[]
CollatorServiceShim. getAvailableULocales()
static ULocale[]
DateFormat. getAvailableULocales()
Returns the set of locales for which DateFormats are installed.static ULocale[]
DateFormatSymbols. getAvailableULocales()
Returns an array of all locales for which thegetInstance
methods of this class can return localized instances.static ULocale[]
DecimalFormatSymbols. getAvailableULocales()
Returns an array of all locales for which thegetInstance
methods of this class can return localized instances.static ULocale[]
NumberFormat. getAvailableULocales()
Returns the list of Locales for which NumberFormats are available.(package private) abstract ULocale[]
NumberFormat.NumberFormatShim. getAvailableULocales()
(package private) ULocale[]
NumberFormatServiceShim. getAvailableULocales()
abstract ULocale[]
PluralRules.Factory. getAvailableULocales()
Deprecated.This API is ICU internal only.static ULocale[]
PluralRules. getAvailableULocales()
Returns the set of locales for which PluralRules are known.static ULocale
Collator. getFunctionalEquivalent(java.lang.String keyword, ULocale locID)
Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.static ULocale
Collator. getFunctionalEquivalent(java.lang.String keyword, ULocale locID, boolean[] isAvailable)
Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.abstract ULocale
PluralRules.Factory. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
Deprecated.This API is ICU internal only.static ULocale
PluralRules. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
Returns the 'functionally equivalent' locale with respect to plural rules.(package private) ULocale
BreakIterator.BreakIteratorCache. getLocale()
ULocale
BreakIterator. getLocale(ULocale.Type type)
Returns the locale that was used to create this object, or null.ULocale
Collator. getLocale(ULocale.Type type)
Returns the locale that was used to create this object, or null.ULocale
CurrencyPluralInfo. getLocale()
Get localeULocale
DateFormatSymbols. getLocale(ULocale.Type type)
Returns the locale that was used to create this object, or null.ULocale
DecimalFormatSymbols. getLocale(ULocale.Type type)
Returns the locale that was used to create this object, or null.ULocale
ListFormatter. getLocale()
Deprecated.This API is ICU internal only.abstract ULocale
LocaleDisplayNames. getLocale()
Returns the locale used to determine the display names.ULocale
LocaleDisplayNames.LastResortLocaleDisplayNames. getLocale()
ULocale
MeasureFormat. getLocale()
Get the locale of this instance.ULocale
RuleBasedCollator. getLocale(ULocale.Type type)
Returns the locale that was used to create this object, or null.(package private) ULocale
SimpleDateFormat. getLocale()
Get the locale of this simple date formatter.ULocale
UFormat. getLocale(ULocale.Type type)
Return the locale that was used to create this object, or null.ULocale[]
RuleBasedNumberFormat. getRuleSetDisplayNameLocales()
Return a list of locales for which there are locale-specific display names for the rule sets in this formatter.abstract ULocale
CurrencyDisplayNames. getULocale()
Returns the locale used to determine how to translate the currency names.ULocale
DecimalFormatSymbols. getULocale()
Returns the locale for which this object was constructed.ULocale
MessageFormat. getULocale()
Returns the locale that's used when creating argument Format objects.Methods in com.ibm.icu.text that return types with arguments of type ULocale Modifier and Type Method Description java.util.Set<ULocale>
SpoofChecker. getAllowedLocales()
Get a read-only set of locales for the scripts that are acceptable in strings to be checked.Methods in com.ibm.icu.text with parameters of type ULocale Modifier and Type Method Description private void
DateTimePatternGenerator. addCLDRData(DateTimePatternGenerator.PatternInfo returnInfo, ULocale uLocale)
private void
DateTimePatternGenerator. addICUPatterns(DateTimePatternGenerator.PatternInfo returnInfo, ULocale uLocale)
private void
AlphabeticIndex. addIndexExemplars(ULocale locale)
This method is called to get the index exemplars.AlphabeticIndex<V>
AlphabeticIndex. addLabels(ULocale... additions)
Add more index characters (aside from what are in the locale)private void
SpoofChecker.Builder. addScriptChars(ULocale locale, UnicodeSet allowedChars)
private static BreakIterator
BreakIteratorFactory. createBreakInstance(ULocale locale, int kind)
abstract BreakIterator
BreakIterator.BreakIteratorServiceShim. createBreakIterator(ULocale l, int k)
BreakIterator
BreakIteratorFactory. createBreakIterator(ULocale locale, int kind)
Collator
Collator.CollatorFactory. createCollator(ULocale loc)
Return an instance of the appropriate collator.NumberFormat
NumberFormat.NumberFormatFactory. createFormat(ULocale loc, int formatType)
Returns a number format of the appropriate type.(package private) static NumberFormat
NumberFormat. createInstance(ULocale desiredLocale, int choice)
(package private) abstract NumberFormat
NumberFormat.NumberFormatShim. createInstance(ULocale l, int k)
(package private) NumberFormat
NumberFormatServiceShim. createInstance(ULocale desiredLocale, int choice)
protected TimeZoneFormat
TimeZoneFormat.TimeZoneFormatCache. createInstance(ULocale key, ULocale data)
protected TimeZoneNames
TimeZoneNames.Cache. createInstance(java.lang.String key, ULocale data)
PluralRules
PluralRules.Factory. forLocale(ULocale locale)
Deprecated.This API is ICU internal only.abstract PluralRules
PluralRules.Factory. forLocale(ULocale locale, PluralRules.PluralType type)
Deprecated.This API is ICU internal only.static PluralRules
PluralRules. forLocale(ULocale locale)
Provides access to the predefined cardinal-numberPluralRules
for a given locale.static PluralRules
PluralRules. forLocale(ULocale locale, PluralRules.PluralType type)
Provides access to the predefinedPluralRules
for a given locale and the plural type.static DecimalFormatSymbols
DecimalFormatSymbols. forNumberingSystem(ULocale locale, NumberingSystem ns)
Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the givenNumberingSystem
.private static DateFormat
DateFormat. get(int dateStyle, int timeStyle, ULocale loc, Calendar cal)
Creates a DateFormat with the given time and/or date style in the given locale.ListFormatter
ListFormatter.Cache. get(ULocale locale, java.lang.String style)
RbnfLenientScanner
RbnfLenientScannerProvider. get(ULocale locale, java.lang.String extras)
Deprecated.ICU 54RelativeDateTimeFormatter.RelativeDateTimeFormatterData
RelativeDateTimeFormatter.Cache. get(ULocale locale)
private void
DateTimePatternGenerator. getAllowedHourFormats(ULocale uLocale)
static BreakIterator
BreakIterator. getBreakInstance(ULocale where, int kind)
Deprecated.This API is ICU internal only.private java.lang.String
DateTimePatternGenerator. getCalendarTypeToUse(ULocale uLocale)
static BreakIterator
BreakIterator. getCharacterInstance(ULocale where)
Returns a new instance of BreakIterator that locates logical-character boundaries.private java.lang.String
DateIntervalFormat. getConcatenationPattern(ULocale locale)
Retrieves the concatenation DateTime pattern from the resource bundle.static MeasureFormat
MeasureFormat. getCurrencyFormat(ULocale locale)
Return a formatter for CurrencyAmount objects in the given locale.static NumberFormat
NumberFormat. getCurrencyInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static java.util.ResourceBundle
DateFormatSymbols. getDateFormatBundle(Calendar cal, ULocale locale)
Deprecated.ICU 4.0static java.util.ResourceBundle
DateFormatSymbols. getDateFormatBundle(java.lang.Class<? extends Calendar> calendarClass, ULocale locale)
Deprecated.ICU 4.0static DateFormat
DateFormat. getDateInstance(int style, ULocale locale)
Returns the date formatter with the given formatting style for the given locale.static DateFormat
DateFormat. getDateInstance(Calendar cal, int dateStyle, ULocale locale)
Creates aDateFormat
object that can be used to format dates in the calendar system specified bycal
.static DateFormat
DateFormat. getDateTimeInstance(int dateStyle, int timeStyle, ULocale locale)
Returns the date/time formatter with the given formatting styles for the given locale.static DateFormat
DateFormat. getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle, ULocale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.java.lang.String
Collator.CollatorFactory. getDisplayName(ULocale objectLocale, ULocale displayLocale)
Return the name of the collator for the objectLocale, localized for the displayLocale.static java.lang.String
Collator. getDisplayName(ULocale objectLocale)
Returns the name of the collator for the objectLocale, localized for the defaultDISPLAY
locale.static java.lang.String
Collator. getDisplayName(ULocale objectLocale, ULocale displayLocale)
Returns the name of the collator for the objectLocale, localized for the displayLocale.(package private) abstract java.lang.String
Collator.ServiceShim. getDisplayName(ULocale ol, ULocale dl)
(package private) java.lang.String
CollatorServiceShim. getDisplayName(ULocale objectLocale, ULocale displayLocale)
static java.lang.String
Transliterator. getDisplayName(java.lang.String id, ULocale inLocale)
Returns a name for this transliterator that is appropriate for display to the user in the given locale.static DateTimePatternGenerator
DateTimePatternGenerator. getFrozenInstance(ULocale uLocale)
Deprecated.This API is ICU internal only.static ULocale
Collator. getFunctionalEquivalent(java.lang.String keyword, ULocale locID)
Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.static ULocale
Collator. getFunctionalEquivalent(java.lang.String keyword, ULocale locID, boolean[] isAvailable)
Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.abstract ULocale
PluralRules.Factory. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
Deprecated.This API is ICU internal only.static ULocale
PluralRules. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)
Returns the 'functionally equivalent' locale with respect to plural rules.static Collator
Collator. getInstance(ULocale locale)
Returns the Collator for the desired locale.(package private) abstract Collator
Collator.ServiceShim. getInstance(ULocale l)
(package private) Collator
CollatorServiceShim. getInstance(ULocale locale)
static CompactDecimalFormat
CompactDecimalFormat. getInstance(ULocale locale, CompactDecimalFormat.CompactStyle style)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static CurrencyDisplayNames
CurrencyDisplayNames. getInstance(ULocale locale)
Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.static CurrencyDisplayNames
CurrencyDisplayNames. getInstance(ULocale locale, boolean noSubstitute)
Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.static CurrencyPluralInfo
CurrencyPluralInfo. getInstance(ULocale locale)
Gets a CurrencyPluralInfo instance for the given locale.static DateFormat
DateFormat. getInstance(Calendar cal, ULocale locale)
Returns a date/time formatter that uses the SHORT style for both the date and the time.static DateFormatSymbols
DateFormatSymbols. getInstance(ULocale locale)
Returns a DateFormatSymbols instance for the given locale.static DateIntervalFormat
DateIntervalFormat. getInstance(java.lang.String skeleton, ULocale locale)
Construct a DateIntervalFormat from skeleton and a given locale.static DateIntervalFormat
DateIntervalFormat. getInstance(java.lang.String skeleton, ULocale locale, DateIntervalInfo dtitvinf)
Construct a DateIntervalFormat from skeleton a DateIntervalInfo, and the given locale.static DateTimePatternGenerator
DateTimePatternGenerator. getInstance(ULocale uLocale)
Construct a flexible generator according to data for a given locale.static DecimalFormatSymbols
DecimalFormatSymbols. getInstance(ULocale locale)
Returns a DecimalFormatSymbols instance for the given locale.static DurationFormat
DurationFormat. getInstance(ULocale locale)
Deprecated.ICU 56static FilteredBreakIteratorBuilder
FilteredBreakIteratorBuilder. getInstance(ULocale where)
Construct a FilteredBreakIteratorBuilder based on sentence break exception rules in a locale.static ListFormatter
ListFormatter. getInstance(ULocale locale)
Create a list formatter that is appropriate for a locale.static ListFormatter
ListFormatter. getInstance(ULocale locale, ListFormatter.Type type, ListFormatter.Width width)
Create a list formatter that is appropriate for a locale.static LocaleDisplayNames
LocaleDisplayNames. getInstance(ULocale locale)
Convenience overload ofLocaleDisplayNames.getInstance(ULocale, DialectHandling)
that specifies STANDARD dialect handling.static LocaleDisplayNames
LocaleDisplayNames. getInstance(ULocale locale, DisplayContext... contexts)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided DisplayContext settingsstatic LocaleDisplayNames
LocaleDisplayNames. getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling.static MeasureFormat
MeasureFormat. getInstance(ULocale locale, MeasureFormat.FormatWidth formatWidth)
Create a format from the locale, formatWidth, and format.static MeasureFormat
MeasureFormat. getInstance(ULocale locale, MeasureFormat.FormatWidth formatWidth, NumberFormat format)
Create a format from the locale, formatWidth, and format.static NumberFormat
NumberFormat. getInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberFormat
NumberFormat. getInstance(ULocale desiredLocale, int choice)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static NumberingSystem
NumberingSystem. getInstance(ULocale locale)
Returns the default numbering system for the specified ULocale.static RelativeDateTimeFormatter
RelativeDateTimeFormatter. getInstance(ULocale locale)
Returns a RelativeDateTimeFormatter for a particular locale.static RelativeDateTimeFormatter
RelativeDateTimeFormatter. getInstance(ULocale locale, NumberFormat nf)
Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object.static RelativeDateTimeFormatter
RelativeDateTimeFormatter. getInstance(ULocale locale, NumberFormat nf, RelativeDateTimeFormatter.Style style, DisplayContext capitalizationContext)
Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object, style, and capitalization contextstatic TimeZoneFormat
TimeZoneFormat. getInstance(ULocale locale)
Returns a frozen instance ofTimeZoneFormat
for the given locale.static TimeZoneNames
TimeZoneNames. getInstance(ULocale locale)
Returns an instance ofTimeZoneNames
for the specified locale.private static ScientificNumberFormatter
ScientificNumberFormatter. getInstanceForLocale(ULocale locale, ScientificNumberFormatter.Style style)
static DateFormat
DateFormat. getInstanceForSkeleton(Calendar cal, java.lang.String skeleton, ULocale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getInstanceForSkeleton(java.lang.String skeleton, ULocale locale)
Returns aDateFormat
object that can be used to format dates and times in the given locale.static DateTimePatternGenerator
DateTimePatternGenerator. getInstanceNoStdPat(ULocale uLocale)
Deprecated.This API is ICU internal only.static NumberFormat
NumberFormat. getIntegerInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static java.lang.String[]
Collator. getKeywordValuesForLocale(java.lang.String key, ULocale locale, boolean commonlyUsed)
Given a key and a locale, returns an array of string values in a preferred order that would make a difference.static BreakIterator
BreakIterator. getLineInstance(ULocale where)
Returns a new instance of BreakIterator that locates legal line- wrapping positions.static ScientificNumberFormatter
ScientificNumberFormatter. getMarkupInstance(ULocale locale, java.lang.String beginMarkup, java.lang.String endMarkup)
Gets a ScientificNumberFormatter instance that uses markup for exponents for this locale.private java.lang.String[]
RuleBasedNumberFormat. getNameListForLocale(ULocale loc)
static NumberFormat
NumberFormat. getNumberInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.protected static java.lang.String
NumberFormat. getPattern(ULocale forLocale, int choice)
Returns the pattern for the provided locale and choice.static java.lang.String
NumberFormat. getPatternForStyle(ULocale forLocale, int choice)
Deprecated.This API is ICU internal only.static java.lang.String
NumberFormat. getPatternForStyleAndNumberingSystem(ULocale forLocale, java.lang.String nsName, int choice)
Deprecated.This API is ICU internal only.static DateFormat
DateFormat. getPatternInstance(Calendar cal, java.lang.String skeleton, ULocale locale)
Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static DateFormat
DateFormat. getPatternInstance(java.lang.String skeleton, ULocale locale)
Returns aDateFormat
object that can be used to format dates and times in the given locale.static NumberFormat
NumberFormat. getPercentInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static java.lang.String
MeasureFormat. getRangeFormat(ULocale forLocale, MeasureFormat.FormatWidth width)
Deprecated.This API is ICU internal only.java.lang.String
RuleBasedNumberFormat. getRuleSetDisplayName(java.lang.String ruleSetName, ULocale loc)
Return the rule set display name for the provided rule set and locale.java.lang.String[]
RuleBasedNumberFormat. getRuleSetDisplayNames(ULocale loc)
Return the rule set display names for the provided locale.static NumberFormat
NumberFormat. getScientificInstance(ULocale inLocale)
NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.static BreakIterator
BreakIterator. getSentenceInstance(ULocale where)
Returns a new instance of BreakIterator that locates sentence boundaries.static ScientificNumberFormatter
ScientificNumberFormatter. getSuperscriptInstance(ULocale locale)
Gets a ScientificNumberFormatter instance that uses superscript characters for exponents for this locale.static DateFormat
DateFormat. getTimeInstance(int style, ULocale locale)
Returns the time formatter with the given formatting style for the given locale.static DateFormat
DateFormat. getTimeInstance(Calendar cal, int timeStyle, ULocale locale)
Creates aDateFormat
object that can be used to format times in the calendar system specified bycal
.TimeZoneNames
TimeZoneNames.DefaultTimeZoneNames.FactoryImpl. getTimeZoneNames(ULocale locale)
abstract TimeZoneNames
TimeZoneNames.Factory. getTimeZoneNames(ULocale locale)
Deprecated.This API is ICU internal only.static BreakIterator
BreakIterator. getTitleInstance(ULocale where)
Deprecated.ICU 64 UseBreakIterator.getWordInstance()
instead.static TimeZoneNames
TimeZoneNames. getTZDBInstance(ULocale locale)
Returns an instance ofTimeZoneNames
containing only short specific zone names (TimeZoneNames.NameType.SHORT_STANDARD
andTimeZoneNames.NameType.SHORT_DAYLIGHT
), compatible with the IANA tz database's zone abbreviations (not localized).static BreakIterator
BreakIterator. getWordInstance(ULocale where)
Returns a new instance of BreakIterator that locates word boundaries.abstract boolean
PluralRules.Factory. hasOverride(ULocale locale)
Deprecated.This API is ICU internal only.private void
PluralFormat. init(PluralRules rules, PluralRules.PluralType type, ULocale locale, NumberFormat numberFormat)
private void
RuleBasedNumberFormat. initCapitalizationContextInfo(ULocale theLocale)
Set capitalizationForListOrMenu, capitalizationForStandAloneprivate void
DateTimePatternGenerator. initData(ULocale uLocale, boolean skipStdPatterns)
private void
CurrencyPluralInfo. initialize(ULocale uloc)
private void
DecimalFormatSymbols. initialize(ULocale locale, NumberingSystem ns)
Initializes the symbols from the locale data.protected void
ChineseDateFormatSymbols. initializeData(ULocale loc, ICUResourceBundle b, java.lang.String calendarType)
Deprecated.ICU 50protected void
DateFormatSymbols. initializeData(ULocale desiredLocale, ICUResourceBundle b, java.lang.String calendarType)
Deprecated.This API is ICU internal only.protected void
DateFormatSymbols. initializeData(ULocale desiredLocale, java.lang.String type)
Initializes format symbols for the locale and calendar typeprivate void
DateIntervalInfo. initializeData(ULocale locale)
private java.util.Map<java.lang.String,DateIntervalInfo.PatternInfo>
DateIntervalFormat. initializeIntervalPattern(java.lang.String fullPattern, ULocale locale)
private void
SimpleDateFormat. initNumberFormatters(ULocale loc)
private static ListFormatter
ListFormatter.Cache. load(ULocale ulocale, java.lang.String style)
private static DecimalFormatSymbols.CacheData
DecimalFormatSymbols. loadData(ULocale locale)
private static MeasureFormat.NumericFormatters
MeasureFormat. loadNumericFormatters(ULocale locale)
java.lang.String
LocaleDisplayNames.LastResortLocaleDisplayNames. localeDisplayName(ULocale locale)
abstract java.lang.String
LocaleDisplayNames. localeDisplayName(ULocale locale)
Returns the display name of the provided ulocale.private static Collator
CollatorServiceShim. makeInstance(ULocale desiredLocale)
private java.lang.String
DateIntervalFormat. normalizeHourMetacharacters(java.lang.String skeleton, ULocale locale)
private void
SimpleDateFormat. processOverrideString(ULocale loc, java.lang.String str)
abstract java.lang.Object
BreakIterator.BreakIteratorServiceShim. registerInstance(BreakIterator iter, ULocale l, int k)
static java.lang.Object
BreakIterator. registerInstance(BreakIterator iter, ULocale locale, int kind)
Registers a new break iterator of the indicated kind, to use in the given locale.java.lang.Object
BreakIteratorFactory. registerInstance(BreakIterator iter, ULocale locale, int kind)
static java.lang.Object
Collator. registerInstance(Collator collator, ULocale locale)
Registers a collator as the default collator for the provided locale.(package private) abstract java.lang.Object
Collator.ServiceShim. registerInstance(Collator c, ULocale l)
(package private) java.lang.Object
CollatorServiceShim. registerInstance(Collator collator, ULocale locale)
private static void
Collator. setAttributesFromKeywords(ULocale loc, Collator coll, RuleBasedCollator rbc)
Sets collation attributes according to locale keywords.private void
DateTimePatternGenerator. setDateTimeFromCalendar(ULocale uLocale)
private void
DateTimePatternGenerator. setDecimalSymbols(ULocale uLocale)
(package private) void
BreakIterator. setLocale(ULocale valid, ULocale actual)
Set information about the locales that were used to create this object.(package private) void
Collator. setLocale(ULocale valid, ULocale actual)
Set information about the locales that were used to create this object.void
CurrencyPluralInfo. setLocale(ULocale loc)
Set locale.(package private) void
DateFormatSymbols. setLocale(ULocale valid, ULocale actual)
Sets information about the locales that were used to create this object.(package private) void
DecimalFormatSymbols. setLocale(ULocale valid, ULocale actual)
Sets information about the locales that were used to create this object.void
MessageFormat. setLocale(ULocale locale)
Sets the locale to be used for creating argument Format objects.void
PluralFormat. setLocale(ULocale ulocale)
Deprecated.ICU 50 This method clears the pattern and might create a different kind of PluralRules instance; use one of the constructors to create a new instance instead.(package private) void
RuleBasedCollator. setLocale(ULocale valid, ULocale actual)
Set information about the locales that were used to create this object.TimeUnitFormat
TimeUnitFormat. setLocale(ULocale locale)
Deprecated.ICU 53 seeMeasureFormat
.(package private) void
UFormat. setLocale(ULocale valid, ULocale actual)
Set information about the locales that were used to create this object.private void
DateIntervalInfo. setup(ULocale locale)
private void
CurrencyPluralInfo. setupCurrencyPluralPattern(ULocale uloc)
(package private) MeasureFormat
MeasureFormat. withLocale(ULocale locale)
Method parameters in com.ibm.icu.text with type arguments of type ULocale Modifier and Type Method Description java.util.List<LocaleDisplayNames.UiListItem>
LocaleDisplayNames. getUiList(java.util.Set<ULocale> localeSet, boolean inSelf, java.util.Comparator<java.lang.Object> collator)
Return a list of information used to construct a UI list of locale names.abstract java.util.List<LocaleDisplayNames.UiListItem>
LocaleDisplayNames. getUiListCompareWholeItems(java.util.Set<ULocale> localeSet, java.util.Comparator<LocaleDisplayNames.UiListItem> comparator)
Return a list of information used to construct a UI list of locale names, providing more access to control the sorting.java.util.List<LocaleDisplayNames.UiListItem>
LocaleDisplayNames.LastResortLocaleDisplayNames. getUiListCompareWholeItems(java.util.Set<ULocale> localeSet, java.util.Comparator<LocaleDisplayNames.UiListItem> comparator)
SpoofChecker.Builder
SpoofChecker.Builder. setAllowedLocales(java.util.Set<ULocale> locales)
Limit characters that are acceptable in identifiers being checked to those normally used with the languages associated with the specified locales.Constructors in com.ibm.icu.text with parameters of type ULocale Constructor Description AlphabeticIndex(ULocale locale)
Create the index object.AlphabeticIndex(ULocale locale, RuleBasedCollator collator)
Internal constructor containing implementation used by public constructors.BreakIteratorCache(ULocale where, BreakIterator iter)
CacheData(ULocale loc, java.lang.String[] digits, java.lang.String[] numberElements)
ChineseDateFormat(java.lang.String pattern, ULocale locale)
Deprecated.ICU 50ChineseDateFormat(java.lang.String pattern, java.lang.String override, ULocale locale)
Deprecated.ICU 50ChineseDateFormatSymbols(Calendar cal, ULocale locale)
Deprecated.ICU 50ChineseDateFormatSymbols(ULocale locale)
Deprecated.ICU 50CompactDecimalFormat(ULocale locale, CompactDecimalFormat.CompactStyle style)
The public mechanism is CompactDecimalFormat.getInstance().CurrencyFormat(ULocale locale)
CurrencyPluralInfo(ULocale locale)
Create a CurrencyPluralInfo object for the given locale.DateFormatSymbols(Calendar cal, ULocale locale)
Returns theDateFormatSymbols
object that should be used to format a calendar system's dates in the given locale.DateFormatSymbols(ULocale locale)
Constructs a DateFormatSymbols object by loading format data from resources for the given ulocale.DateFormatSymbols(ULocale desiredLocale, ICUResourceBundle b, java.lang.String calendarType)
Private, for cache.getInstance().DateFormatSymbols(java.lang.Class<? extends Calendar> calendarClass, ULocale locale)
Variant of DateFormatSymbols(Calendar, ULocale) that takes the Calendar class instead of a Calendar instance.DateFormatSymbols(java.util.ResourceBundle bundle, ULocale locale)
Fetches a custom calendar's DateFormatSymbols out of the given resource bundle.DateIntervalFormat(java.lang.String skeleton, ULocale locale, SimpleDateFormat simpleDateFormat)
DateIntervalInfo(ULocale locale)
Construct DateIntervalInfo for the given locale,DecimalFormatSymbols(ULocale locale)
Creates a DecimalFormatSymbols object for the given locale.DecimalFormatSymbols(ULocale locale, NumberingSystem ns)
DurationFormat(ULocale locale)
Deprecated.This API is ICU internal only.LastResortLocaleDisplayNames(ULocale locale, DisplayContext... contexts)
LastResortLocaleDisplayNames(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
ListFormatter(java.lang.String two, java.lang.String start, java.lang.String middle, java.lang.String end, ULocale locale)
Loader(ULocale ulocale)
LocaleLookupData(ULocale locale, java.lang.String numbersKeyword)
LowercaseTransliterator(ULocale loc)
Constructs a transliterator.MeasureFormat(ULocale locale, MeasureFormat.FormatWidth formatWidth)
MeasureFormat(ULocale locale, MeasureFormat.FormatWidth formatWidth, NumberFormat numberFormat, PluralRules rules)
MeasureFormat(ULocale locale, MeasureFormat.FormatWidth formatWidth, NumberFormat numberFormat, PluralRules rules, MeasureFormat.NumericFormatters formatters)
MeasureProxy(ULocale locale, MeasureFormat.FormatWidth width, NumberFormat numberFormat, int subClass)
MessageFormat(java.lang.String pattern, ULocale locale)
Constructs a MessageFormat for the specified locale and pattern.PluralFormat(ULocale ulocale)
Creates a new cardinal-numberPluralFormat
for a given locale.PluralFormat(ULocale ulocale, PluralRules rules)
Creates a new cardinal-numberPluralFormat
for a given set of rules.PluralFormat(ULocale ulocale, PluralRules.PluralType type)
Creates a newPluralFormat
for the plural type.PluralFormat(ULocale ulocale, PluralRules.PluralType type, java.lang.String pattern)
Creates a newPluralFormat
for a plural type, a pattern and a locale.PluralFormat(ULocale ulocale, PluralRules.PluralType type, java.lang.String pattern, NumberFormat numberFormat)
Creates a newPluralFormat
for a plural type, a pattern and a locale.PluralFormat(ULocale ulocale, PluralRules rules, java.lang.String pattern)
Creates a new cardinal-numberPluralFormat
for a given set of rules, a pattern and a locale.PluralFormat(ULocale ulocale, java.lang.String pattern)
Creates a new cardinal-numberPluralFormat
for a given pattern string and locale.RelativeDateTimeFormatter(java.util.EnumMap<RelativeDateTimeFormatter.Style,java.util.EnumMap<RelativeDateTimeFormatter.AbsoluteUnit,java.util.EnumMap<RelativeDateTimeFormatter.Direction,java.lang.String>>> qualitativeUnitMap, java.util.EnumMap<RelativeDateTimeFormatter.Style,java.util.EnumMap<RelativeDateTimeFormatter.RelativeUnit,java.lang.String[][]>> patternMap, java.lang.String combinedDateAndTime, PluralRules pluralRules, NumberFormat numberFormat, RelativeDateTimeFormatter.Style style, DisplayContext capitalizationContext, BreakIterator breakIterator, ULocale locale)
RuleBasedCollator(CollationTailoring t, ULocale vl)
RuleBasedNumberFormat(ULocale locale, int format)
Creates a RuleBasedNumberFormat from a predefined description.RuleBasedNumberFormat(java.lang.String description, ULocale locale)
Creates a RuleBasedNumberFormat that behaves according to the description passed in.RuleBasedNumberFormat(java.lang.String description, java.lang.String[][] localizations, ULocale locale)
Creates a RuleBasedNumberFormat that behaves according to the description passed in.SimpleDateFormat(java.lang.String pattern, DateFormatSymbols formatData, Calendar calendar, NumberFormat numberFormat, ULocale locale, boolean useFastFormat, java.lang.String override)
SimpleDateFormat(java.lang.String pattern, DateFormatSymbols formatData, Calendar calendar, ULocale locale, boolean useFastFormat, java.lang.String override)
Package-private constructor that allows a subclass to specify whether it supports fast formatting.SimpleDateFormat(java.lang.String pattern, DateFormatSymbols formatData, ULocale loc)
Deprecated.This API is ICU internal only.SimpleDateFormat(java.lang.String pattern, ULocale loc)
Constructs a SimpleDateFormat using the given pattern and locale.SimpleDateFormat(java.lang.String pattern, java.lang.String override, ULocale loc)
Constructs a SimpleDateFormat using the given pattern , override and locale.SimpleNumberFormatFactory(ULocale locale)
Constructs a SimpleNumberFormatFactory with the given locale.SimpleNumberFormatFactory(ULocale locale, boolean visible)
Constructs a SimpleNumberFormatFactory with the given locale and the visibility.StringSearch(java.lang.String pattern, java.text.CharacterIterator target, ULocale locale)
Initializes the iterator to use the language-specific rules and break iterator rules defined in the argument locale to search for argument pattern in the argument target text.TimeUnitFormat(ULocale locale)
Deprecated.ICU 53 useMeasureFormat
instead.TimeUnitFormat(ULocale locale, int style)
Deprecated.ICU 53 useMeasureFormat
instead.TimeUnitFormat(ULocale locale, int style, NumberFormat numberFormat)
Deprecated.TimeUnitFormatSetupSink(java.util.Map<TimeUnit,java.util.Map<java.lang.String,java.lang.Object[]>> timeUnitToCountToPatterns, int style, java.util.Set<java.lang.String> pluralKeywords, ULocale locale)
TimeZoneFormat(ULocale locale)
The protected constructor for subclassing.TitlecaseTransliterator(ULocale loc)
Constructs a transliterator.UiListItem(ULocale minimized, ULocale modified, java.lang.String nameInDisplayLocale, java.lang.String nameInSelf)
Constructor, normally only called internally.UppercaseTransliterator(ULocale loc)
Constructs a transliterator. -
Uses of ULocale in com.ibm.icu.util
Fields in com.ibm.icu.util declared as ULocale Modifier and Type Field Description private ULocale
Calendar. actualLocale
The locale containing data used to construct this object, or null.static ULocale
ULocale. CANADA
Useful constant for country/region.static ULocale
ULocale. CANADA_FRENCH
Useful constant for country/region.static ULocale
ULocale. CHINA
Useful constant for country/region.static ULocale
ULocale. CHINESE
Useful constant for language.private ULocale
LocaleMatcher.ULocaleLsrIterator. current
private static ULocale[]
ULocale. defaultCategoryULocales
private ULocale
LocaleMatcher.Builder. defaultLocale
private ULocale
LocaleMatcher. defaultULocale
private static ULocale
ULocale. defaultULocale
Keep our own default ULocale.private ULocale
LocaleMatcher.Result. desiredULocale
static ULocale
ULocale. ENGLISH
Useful constant for language.static ULocale
ULocale. FRANCE
Useful constant for country/region.static ULocale
ULocale. FRENCH
Useful constant for language.static ULocale
ULocale. GERMAN
Useful constant for language.static ULocale
ULocale. GERMANY
Useful constant for country/region.static ULocale
ULocale. ITALIAN
Useful constant for language.static ULocale
ULocale. ITALY
Useful constant for country/region.static ULocale
ULocale. JAPAN
Useful constant for country/region.static ULocale
ULocale. JAPANESE
Useful constant for language.static ULocale
ULocale. KOREA
Useful constant for country/region.static ULocale
ULocale. KOREAN
Useful constant for language.private ULocale
Calendar.FormatConfiguration. loc
Deprecated.private ULocale
LocaleMatcher.Builder. maxDistanceDesired
private ULocale
LocaleMatcher.Builder. maxDistanceSupported
static ULocale
ULocale. PRC
Useful constant for country/region.private ULocale
LocaleMatcher.ULocaleLsrIterator. remembered
static ULocale
ULocale. ROOT
The root ULocale.static ULocale
ULocale. SIMPLIFIED_CHINESE
Useful constant for language.private ULocale
LocaleMatcher.Result. supportedULocale
private ULocale[]
LocaleMatcher. supportedULocales
static ULocale
ULocale. TAIWAN
Useful constant for country/region.static ULocale
ULocale. TRADITIONAL_CHINESE
Useful constant for language.static ULocale
ULocale. UK
Useful constant for country/region.private static ULocale
Currency. UND
private static ULocale
LocaleMatcher. UND_ULOCALE
static ULocale
ULocale. US
Useful constant for country/region.private ULocale
Calendar. validLocale
The most specific locale containing any resource data, or null.Fields in com.ibm.icu.util with type parameters of type ULocale Modifier and Type Field Description private static java.util.HashMap<ULocale,java.util.BitSet>
GlobalizationPreferences. available_locales
private ICUCache<ULocale,GenderInfo>
GenderInfo.Cache. cache
private static SoftCache<java.util.Locale,ULocale,java.lang.Void>
ULocale. CACHE
private static ICUCache<ULocale,java.util.List<TextTrieMap<Currency.CurrencyStringInfo>>>
Currency. CURRENCY_NAME_CACHE
private java.util.List<ULocale>
GlobalizationPreferences. implicitLocales
private java.util.Map<ULocale,java.lang.Double>
LocalePriorityList. languagesAndWeights
private java.util.Map<ULocale,java.lang.Double>
LocalePriorityList.Builder. languageToWeight
These store the input languages and weights, in chronological order, where later additions override previous ones.private java.util.List<ULocale>
GlobalizationPreferences. locales
private java.util.Iterator<ULocale>
LocaleMatcher.ULocaleLsrIterator. locales
private java.util.List<ULocale>
LocaleMatcher.Builder. supportedLocales
Methods in com.ibm.icu.util that return ULocale Modifier and Type Method Description static ULocale
ULocale. acceptLanguage(ULocale[] acceptLanguageList, boolean[] fallback)
Based on an ordered array of acceptable locales, determine an available locale for the user.static ULocale
ULocale. acceptLanguage(ULocale[] acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)
Based on a list of acceptable locales, determine an available locale for the user.static ULocale
ULocale. acceptLanguage(java.lang.String acceptLanguageList, boolean[] fallback)
Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static ULocale
ULocale. acceptLanguage(java.lang.String acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)
Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static ULocale
ULocale. addLikelySubtags(ULocale loc)
Adds the likely subtags for a provided locale ID, per the algorithm described in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags If the provided ULocale instance is already in the maximal form, or there is no data available available for maximization, it will be returned.ULocale
ULocale.Builder. build()
Returns an instance ofULocale
created from the fields set on this builder.ULocale
LocaleMatcher. canonicalize(ULocale locale)
Partially canonicalizes a locale (language).static ULocale
ULocale. createCanonical(ULocale locale)
Creates a ULocale from the locale by first canonicalizing the locale according to CLDR.static ULocale
ULocale. createCanonical(java.lang.String nonCanonicalID)
Creates a ULocale from the id by first canonicalizing the id according to CLDR.static ULocale
ULocale. forLanguageTag(java.lang.String languageTag)
Returns a locale for the specified IETF BCP 47 language tag string.static ULocale
ULocale. forLocale(java.util.Locale loc)
Returns a ULocale object for aLocale
.private ULocale
GlobalizationPreferences. getAvailableLocale(int type)
static ULocale[]
ULocale. getAvailableLocales()
Unlike the Locale API, this returns an array ofULocale
, notLocale
.static ULocale[]
Calendar. getAvailableULocales()
Returns the list of locales for which Calendars are installed.static ULocale[]
Currency. getAvailableULocales()
Return an array of the ulocales for which a currency is defined.(package private) abstract ULocale[]
Currency.ServiceShim. getAvailableULocales()
(package private) ULocale[]
CurrencyServiceShim. getAvailableULocales()
ULocale
LocaleMatcher. getBestMatch(ULocale desiredLocale)
Returns the supported locale which best matches the desired locale.ULocale
LocaleMatcher. getBestMatch(java.lang.Iterable<ULocale> desiredLocales)
Returns the supported locale which best matches one of the desired locales.ULocale
LocaleMatcher. getBestMatch(java.lang.String desiredLocaleList)
Parses the string likeLocalePriorityList
does and returns the supported locale which best matches one of the desired locales.static ULocale
ULocale. getDefault()
Returns the current default ULocale.static ULocale
ULocale. getDefault(ULocale.Category category)
Returns the current default ULocale for the specified category.ULocale
LocaleMatcher.Result. getDesiredULocale()
Returns the best-matching desired locale.ULocale
ULocale. getFallback()
Returns the fallback locale for this locale.private static ULocale
ULocale. getInstance(BaseLocale base, LocaleExtensions exts)
ULocale
Calendar.FormatConfiguration. getLocale()
Deprecated.This API is ICU internal only.ULocale
Calendar. getLocale(ULocale.Type type)
Returns the locale that was used to create this object, or null.ULocale
GlobalizationPreferences. getLocale(int index)
Convenience function for getting the locales in priority orderULocale
LocaleMatcher.Result. getSupportedULocale()
Returns the best-matching supported locale.abstract ULocale
UResourceBundle. getULocale()
Returns the RFC 3066 conformant locale id of this resource bundle.ULocale
LocaleMatcher.Result. makeResolvedULocale()
Takes the best-matching supported locale and adds relevant fields of the best-matching desired locale, such as the -t- and -u- extensions.static ULocale
ULocale. minimizeSubtags(ULocale loc)
Minimizes the subtags for a provided locale ID, per the algorithm described in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags If the provided ULocale instance is already in the minimal form, or there is no data available for minimization, it will be returned.static ULocale
ULocale. minimizeSubtags(ULocale loc, ULocale.Minimize fieldToFavor)
Deprecated.This API is ICU internal only.ULocale
ULocale. setKeywordValue(java.lang.String keyword, java.lang.String value)
Given a keyword and a value, return a new locale with an updated keyword and value.static ULocale
ULocale.JDKLocaleHelper. toULocale(java.util.Locale loc)
Methods in com.ibm.icu.util that return types with arguments of type ULocale Modifier and Type Method Description static java.util.Collection<ULocale>
ULocale. getAvailableLocalesByType(ULocale.AvailableType type)
Returns a list of all installed locales according to the specified type.java.util.List<ULocale>
GlobalizationPreferences. getLocales()
Get a copy of the language/locale priority listjava.util.Set<ULocale>
LocalePriorityList. getULocales()
Returns the locales as an immutable Set view.protected java.util.List<ULocale>
GlobalizationPreferences. guessLocales()
This function can be overridden by subclasses to use different heuristics It MUST return a 'safe' value, one whose modification will not affect this object.java.util.Iterator<ULocale>
LocalePriorityList. iterator()
protected java.util.List<ULocale>
GlobalizationPreferences. processLocales(java.util.List<ULocale> inputLocales)
Process a language/locale priority list specified viasetLocales
.Methods in com.ibm.icu.util with parameters of type ULocale Modifier and Type Method Description private java.lang.String
TimeZone. _getDisplayName(int style, boolean daylight, ULocale locale)
internal version (which is called by public APIs) accepts SHORT, LONG, SHORT_GENERIC, LONG_GENERIC, SHORT_GMT, LONG_GMT, SHORT_COMMONLY_USED and GENERIC_LOCATION.static ULocale
ULocale. acceptLanguage(ULocale[] acceptLanguageList, boolean[] fallback)
Based on an ordered array of acceptable locales, determine an available locale for the user.static ULocale
ULocale. acceptLanguage(ULocale[] acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)
Based on a list of acceptable locales, determine an available locale for the user.static ULocale
ULocale. acceptLanguage(java.lang.String acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)
Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static LocalePriorityList.Builder
LocalePriorityList. add(ULocale... locales)
Creates a Builder and adds locales, each with weight 1.0.static LocalePriorityList.Builder
LocalePriorityList. add(ULocale locale, double weight)
Creates a Builder and adds a locale with a specified weight.LocalePriorityList.Builder
LocalePriorityList.Builder. add(ULocale locale)
Adds a locale with weight 1.0.LocalePriorityList.Builder
LocalePriorityList.Builder. add(ULocale... locales)
Adds locales, each with weight 1.0.LocalePriorityList.Builder
LocalePriorityList.Builder. add(ULocale locale, double weight)
Adds a locale with a specified weight.static ULocale
ULocale. addLikelySubtags(ULocale loc)
Adds the likely subtags for a provided locale ID, per the algorithm described in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags If the provided ULocale instance is already in the maximal form, or there is no data available available for maximization, it will be returned.LocaleMatcher.Builder
LocaleMatcher.Builder. addSupportedULocale(ULocale locale)
Adds another supported locale.ULocale
LocaleMatcher. canonicalize(ULocale locale)
Partially canonicalizes a locale (language).int
ULocale. compareTo(ULocale other)
Compares two ULocale for ordering.static ULocale
ULocale. createCanonical(ULocale locale)
Creates a ULocale from the locale by first canonicalizing the locale according to CLDR.(package private) static Currency
Currency. createCurrency(ULocale loc)
Instantiate a currency from resource data.private static Calendar
Calendar. createInstance(ULocale locale)
(package private) abstract Currency
Currency.ServiceShim. createInstance(ULocale l)
(package private) Currency
CurrencyServiceShim. createInstance(ULocale loc)
private static DateFormat
Calendar. formatHelper(Calendar cal, ULocale loc, int dateStyle, int timeStyle)
static TimeZone
TimeZone. forULocaleOrDefault(ULocale locale)
Deprecated.This API is ICU internal only.GenderInfo
GenderInfo.Cache. get(ULocale locale)
static java.lang.String[]
Currency. getAvailableCurrencyCodes(ULocale loc, java.util.Date d)
Returns an array of Strings which contain the currency identifiers that are valid for the given locale on the given date.ULocale
LocaleMatcher. getBestMatch(ULocale desiredLocale)
Returns the supported locale which best matches the desired locale.LocaleMatcher.Result
LocaleMatcher. getBestMatchResult(ULocale desiredLocale)
Returns the best match between the desired locale and the supported locales.static UResourceBundle
UResourceBundle. getBundleInstance(ULocale locale)
Creates a UResourceBundle for the locale specified, from which users can extract resources by using their corresponding keys.static UResourceBundle
UResourceBundle. getBundleInstance(java.lang.String baseName, ULocale locale)
Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.static UResourceBundle
UResourceBundle. getBundleInstance(java.lang.String baseName, ULocale locale, java.lang.ClassLoader loader)
Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.
Note: Please use this API for loading non-ICU resources.private static CalType
Calendar. getCalendarTypeForLocale(ULocale l)
private static java.util.List<TextTrieMap<Currency.CurrencyStringInfo>>
Currency. getCurrencyTrieVec(ULocale locale)
static java.lang.String
Calendar. getDateAtTimePattern(Calendar cal, ULocale uLocale, int dateStyle)
Deprecated.This API is ICU internal only.DateFormat
Calendar. getDateTimeFormat(int dateStyle, int timeStyle, ULocale loc)
Returns aDateFormat
appropriate to this calendar.static java.lang.String
Calendar. getDateTimePattern(Calendar cal, ULocale uLocale, int dateStyle)
Deprecated.This API is ICU internal only.java.lang.String
ULocale. getDisplayCountry(ULocale displayLocale)
Returns this locale's country localized for display in the provided locale.static java.lang.String
ULocale. getDisplayCountry(java.lang.String localeID, ULocale displayLocale)
Returns a locale's country localized for display in the provided locale.private static java.lang.String
ULocale. getDisplayCountryInternal(ULocale locale, ULocale displayLocale)
static java.lang.String
ULocale. getDisplayKeyword(java.lang.String keyword, ULocale displayLocale)
Returns a keyword localized for display in the specified locale.private static java.lang.String
ULocale. getDisplayKeywordInternal(java.lang.String keyword, ULocale displayLocale)
java.lang.String
ULocale. getDisplayKeywordValue(java.lang.String keyword, ULocale displayLocale)
Returns a keyword value localized for display in the specified locale.static java.lang.String
ULocale. getDisplayKeywordValue(java.lang.String localeID, java.lang.String keyword, ULocale displayLocale)
Returns a keyword value localized for display in the specified locale.private static java.lang.String
ULocale. getDisplayKeywordValueInternal(ULocale locale, java.lang.String keyword, ULocale displayLocale)
java.lang.String
ULocale. getDisplayLanguage(ULocale displayLocale)
Returns this locale's language localized for display in the provided locale.static java.lang.String
ULocale. getDisplayLanguage(java.lang.String localeID, ULocale displayLocale)
Returns a locale's language localized for display in the provided locale.private static java.lang.String
ULocale. getDisplayLanguageInternal(ULocale locale, ULocale displayLocale, boolean useDialect)
java.lang.String
ULocale. getDisplayLanguageWithDialect(ULocale displayLocale)
Returns this locale's language localized for display in the provided locale.static java.lang.String
ULocale. getDisplayLanguageWithDialect(java.lang.String localeID, ULocale displayLocale)
Returns a locale's language localized for display in the provided locale.java.lang.String
Calendar. getDisplayName(ULocale loc)
Returns the name of this calendar in the language of the given locale.java.lang.String
Holiday. getDisplayName(ULocale locale)
Return the name of this holiday in the language of the specified locale Thename
parameter passed to this object's constructor is used as a key to look up the holiday's localized name in a ResourceBundle object named HolidayBundle.java.lang.String
TimeZone. getDisplayName(boolean daylight, int style, ULocale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale.java.lang.String
TimeZone. getDisplayName(ULocale locale)
Returns a name of this time zone suitable for presentation to the user in the specified locale.java.lang.String
ULocale. getDisplayName(ULocale displayLocale)
Returns this locale name localized for display in the provided locale.static java.lang.String
ULocale. getDisplayName(java.lang.String localeID, ULocale displayLocale)
Returns the locale ID localized for display in the provided locale.private static java.lang.String
ULocale. getDisplayNameInternal(ULocale locale, ULocale displayLocale)
java.lang.String
ULocale. getDisplayNameWithDialect(ULocale displayLocale)
Returns this locale name localized for display in the provided locale.static java.lang.String
ULocale. getDisplayNameWithDialect(java.lang.String localeID, ULocale displayLocale)
Returns the locale ID localized for display in the provided locale.private static java.lang.String
ULocale. getDisplayNameWithDialectInternal(ULocale locale, ULocale displayLocale)
java.lang.String
ULocale. getDisplayScript(ULocale displayLocale)
Returns this locale's script localized for display in the provided locale.static java.lang.String
ULocale. getDisplayScript(java.lang.String localeID, ULocale displayLocale)
Returns a locale's script localized for display in the provided locale.java.lang.String
ULocale. getDisplayScriptInContext(ULocale displayLocale)
Deprecated.This API is ICU internal only.static java.lang.String
ULocale. getDisplayScriptInContext(java.lang.String localeID, ULocale displayLocale)
Deprecated.This API is ICU internal only.private static java.lang.String
ULocale. getDisplayScriptInContextInternal(ULocale locale, ULocale displayLocale)
private static java.lang.String
ULocale. getDisplayScriptInternal(ULocale locale, ULocale displayLocale)
java.lang.String
ULocale. getDisplayVariant(ULocale displayLocale)
Returns this locale's variant localized for display in the provided locale.static java.lang.String
ULocale. getDisplayVariant(java.lang.String localeID, ULocale displayLocale)
Returns a locale's variant localized for display in the provided locale.private static java.lang.String
ULocale. getDisplayVariantInternal(ULocale locale, ULocale displayLocale)
static UnicodeSet
LocaleData. getExemplarSet(ULocale locale, int options)
Returns the set of exemplar characters for a locale.static UnicodeSet
LocaleData. getExemplarSet(ULocale locale, int options, int extype)
Returns the set of exemplar characters for a locale.static Holiday[]
Holiday. getHolidays(ULocale locale)
static Calendar
Calendar. getInstance(TimeZone zone, ULocale locale)
Returns a calendar with the specified time zone and locale.static Calendar
Calendar. getInstance(ULocale locale)
Returns a calendar using the default time zone and specified locale.static Currency
Currency. getInstance(ULocale locale)
Returns a currency object for the default currency in the given locale.static GenderInfo
GenderInfo. getInstance(ULocale uLocale)
Deprecated.This API is ICU internal only.static LocaleData
LocaleData. getInstance(ULocale locale)
Gets the LocaleData object associated with the ULocale specified in localeprivate static Calendar
Calendar. getInstanceInternal(TimeZone tz, ULocale locale)
static java.lang.String[]
Calendar. getKeywordValuesForLocale(java.lang.String key, ULocale locale, boolean commonlyUsed)
Given a key and a locale, returns an array of string values in a preferred order that would make a difference.static java.lang.String[]
Currency. getKeywordValuesForLocale(java.lang.String key, ULocale locale, boolean commonlyUsed)
Given a key and a locale, returns an array of values for the key for which data exists.private static LSR
LocaleMatcher. getMaximalLsrOrUnd(ULocale locale)
static LocaleData.MeasurementSystem
LocaleData. getMeasurementSystem(ULocale locale)
Returns the measurement system used in the locale specified by the locale.java.lang.String
Currency. getName(ULocale locale, int nameStyle, boolean[] isChoiceFormat)
Returns the display name for the given currency in the given locale.java.lang.String
Currency. getName(ULocale locale, int nameStyle, java.lang.String pluralCount, boolean[] isChoiceFormat)
Returns the display name for the given currency in the given locale.static LocaleData.PaperSize
LocaleData. getPaperSize(ULocale locale)
Returns the size of paper used in the locale.static TextTrieMap<Currency.CurrencyStringInfo>
Currency. getParsingTrie(ULocale locale, int type)
Deprecated.This API is ICU internal only.private static Calendar.PatternData
Calendar. getPatternData(ULocale locale, java.lang.String calType)
Retrieves the DateTime patterns and overrides from the resource bundle and generates a new PatternData object.private static java.lang.String
Calendar. getRegionForCalendar(ULocale loc)
static java.lang.String
ULocale. getRegionForSupplementalData(ULocale locale, boolean inferRegion)
Deprecated.This API is ICU internal only.private static java.lang.String
ULocale. getRegionFromKey(ULocale locale, java.lang.String key)
Get region code from a key in locale or null.java.lang.String
Currency. getSymbol(ULocale uloc)
Convenience and compatibility override of getName that requests the symbol name.java.lang.Double
LocalePriorityList. getWeight(ULocale locale)
Returns the weight for a given language/locale, or null if there is none.protected DateFormat
Calendar. handleGetDateFormat(java.lang.String pattern, ULocale locale)
Creates aDateFormat
appropriate to this calendar.protected DateFormat
Calendar. handleGetDateFormat(java.lang.String pattern, java.lang.String override, ULocale locale)
Creates aDateFormat
appropriate to this calendar.protected DateFormat
ChineseCalendar. handleGetDateFormat(java.lang.String pattern, java.lang.String override, ULocale locale)
Creates aDateFormat
appropriate to this calendar.private boolean
GlobalizationPreferences. isAvailableLocale(ULocale loc, int type)
boolean
LocaleMatcher. isMatch(ULocale desired, ULocale supported)
Returns true if the pair of locales matches acceptably.private static GenderInfo
GenderInfo.Cache. load(ULocale ulocale)
private static Calendar.PatternData
Calendar.PatternData. make(Calendar cal, ULocale loc)
private LocaleMatcher.Result
LocaleMatcher. makeResult(ULocale desiredLocale, LocaleMatcher.ULocaleLsrIterator lsrIter, int suppIndex)
double
LocaleMatcher. match(ULocale desired, ULocale desiredMax, ULocale supported, ULocale supportedMax)
Deprecated.ICU 65 Build and use a matcher rather than comparing pairs of locales.private static UResourceBundle
LocaleData. measurementTypeBundleForLocale(ULocale locale, java.lang.String measurementType)
Utility for getMeasurementSystem and getPaperSizestatic ULocale
ULocale. minimizeSubtags(ULocale loc)
Minimizes the subtags for a provided locale ID, per the algorithm described in the following CLDR technical report: http://www.unicode.org/reports/tr35/#Likely_Subtags If the provided ULocale instance is already in the minimal form, or there is no data available for minimization, it will be returned.static ULocale
ULocale. minimizeSubtags(ULocale loc, ULocale.Minimize fieldToFavor)
Deprecated.This API is ICU internal only.static java.lang.String
Currency. parse(ULocale locale, java.lang.String text, int type, java.text.ParsePosition pos)
Deprecated.This API is ICU internal only.static java.lang.Object
Currency. registerInstance(Currency currency, ULocale locale)
Registers a new currency for the provided locale.(package private) abstract java.lang.Object
Currency.ServiceShim. registerInstance(Currency c, ULocale l)
(package private) java.lang.Object
CurrencyServiceShim. registerInstance(Currency currency, ULocale locale)
private void
EthiopicCalendar. setCalcTypeForLocale(ULocale locale)
set type based on localeprivate void
IslamicCalendar. setCalcTypeForLocale(ULocale locale)
set type based on localeprivate void
Calendar. setCalendarLocale(ULocale locale)
static void
ULocale. setDefault(ULocale newLocale)
Sets the default ULocale.static void
ULocale. setDefault(ULocale.Category category, ULocale newLocale)
Sets the defaultULocale
for the specifiedCategory
.LocaleMatcher.Builder
LocaleMatcher.Builder. setDefaultULocale(ULocale defaultLocale)
Sets the default locale; if null, or if it is not set explicitly, then the first supported locale is used as the default locale.(package private) void
Calendar. setLocale(ULocale valid, ULocale actual)
Set information about the locales that were used to create this object.GlobalizationPreferences
GlobalizationPreferences. setLocale(ULocale uLocale)
Convenience routine for setting the language/locale priority list from a single locale/language.ULocale.Builder
ULocale.Builder. setLocale(ULocale locale)
Resets theBuilder
to match the providedlocale
.GlobalizationPreferences
GlobalizationPreferences. setLocales(ULocale[] uLocales)
Convenience routine for setting the language/locale priority list from an array.LocaleMatcher.Builder
LocaleMatcher.Builder. setMaxDistance(ULocale desired, ULocale supported)
Sets the maximum distance for an acceptable match.private static void
Currency. setupCurrencyTrieVec(ULocale locale, java.util.List<TextTrieMap<Currency.CurrencyStringInfo>> trieVec)
static java.util.Locale
ULocale.JDKLocaleHelper. toLocale(ULocale uloc)
Method parameters in com.ibm.icu.util with type arguments of type ULocale Modifier and Type Method Description ULocale
LocaleMatcher. getBestMatch(java.lang.Iterable<ULocale> desiredLocales)
Returns the supported locale which best matches one of the desired locales.LocaleMatcher.Result
LocaleMatcher. getBestMatchResult(java.lang.Iterable<ULocale> desiredLocales)
Returns the best match between the desired and supported locales.protected java.util.List<ULocale>
GlobalizationPreferences. processLocales(java.util.List<ULocale> inputLocales)
Process a language/locale priority list specified viasetLocales
.GlobalizationPreferences
GlobalizationPreferences. setLocales(java.util.List<ULocale> inputLocales)
Sets the language/locale priority list.LocaleMatcher.Builder
LocaleMatcher.Builder. setSupportedULocales(java.util.Collection<ULocale> locales)
Copies the supported locales, preserving iteration order.Constructors in com.ibm.icu.util with parameters of type ULocale Constructor Description BuddhistCalendar(TimeZone zone, ULocale locale)
Constructs aBuddhistCalendar
based on the current time in the given time zone with the given locale.BuddhistCalendar(ULocale locale)
Constructs aBuddhistCalendar
based on the current time in the default time zone with the given locale.Calendar(TimeZone zone, ULocale locale)
Constructs a calendar with the specified time zone and locale.CECalendar(TimeZone zone, ULocale locale)
Constructs aCECalendar
based on the current time in the given time zone with the given locale.CECalendar(ULocale locale)
Constructs aCECalendar
based on the current time in the default time zone with the given locale.ChineseCalendar(TimeZone zone, ULocale locale)
Construct aChineseCalendar
based on the current time with the given time zone with the given locale.ChineseCalendar(TimeZone zone, ULocale locale, int epochYear, TimeZone zoneAstroCalc)
Deprecated.This API is ICU internal only.ChineseCalendar(ULocale locale)
Constructs aChineseCalendar
based on the current time in the default time zone with the given locale.CopticCalendar(TimeZone zone, ULocale locale)
Constructs aCopticCalendar
based on the current time in the given time zone with the given locale.CopticCalendar(ULocale locale)
Constructs aCopticCalendar
based on the current time in the default time zone with the given locale.DangiCalendar(TimeZone zone, ULocale locale)
Deprecated.This API is ICU internal only.EthiopicCalendar(TimeZone zone, ULocale locale)
Constructs aEthiopicCalendar
based on the current time in the given time zone with the given locale.EthiopicCalendar(ULocale locale)
Constructs aEthiopicCalendar
based on the current time in the default time zone with the given locale.GregorianCalendar(TimeZone zone, ULocale locale)
Constructs a GregorianCalendar based on the current time in the given time zone with the given locale.GregorianCalendar(ULocale locale)
Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.HebrewCalendar(TimeZone zone, ULocale locale)
Constructs aHebrewCalendar
based on the current time in the given time zone with the given locale.HebrewCalendar(ULocale locale)
Constructs aHebrewCalendar
based on the current time in the default time zone with the given locale.IndianCalendar(TimeZone zone, ULocale locale)
Constructs aIndianCalendar
based on the current time in the given time zone with the given locale.IndianCalendar(ULocale locale)
Constructs aIndianCalendar
based on the current time in the default time zone with the given locale.IslamicCalendar(TimeZone zone, ULocale locale)
Constructs anIslamicCalendar
based on the current time in the given time zone with the given locale.IslamicCalendar(ULocale locale)
Constructs anIslamicCalendar
based on the current time in the default time zone with the given locale.JapaneseCalendar(TimeZone zone, ULocale locale)
Constructs aJapaneseCalendar
based on the current time in the given time zone with the given locale.JapaneseCalendar(ULocale locale)
Constructs aJapaneseCalendar
based on the current time in the default time zone with the given locale.PersianCalendar(TimeZone zone, ULocale locale)
Deprecated.This API is ICU internal only.PersianCalendar(ULocale locale)
Deprecated.This API is ICU internal only.Result(ULocale udesired, ULocale usupported, java.util.Locale desired, java.util.Locale supported, int desIndex, int suppIndex)
TaiwanCalendar(TimeZone zone, ULocale locale)
Constructs aTaiwanCalendar
based on the current time in the given time zone with the given locale.TaiwanCalendar(ULocale locale)
Constructs aTaiwanCalendar
based on the current time in the default time zone with the given locale.Constructor parameters in com.ibm.icu.util with type arguments of type ULocale Constructor Description LocalePriorityList(java.util.Map<ULocale,java.lang.Double> languageToWeight)
ULocaleLsrIterator(java.util.Iterator<ULocale> locales)
-