Uses of Class
com.ibm.icu.util.ULocale
Packages that use ULocale
Package
Description
Enhanced character property and surrogate support.
Library for localized number formatting introduced in ICU 60; for usage, see com.ibm.icu.number.NumberFormatter.
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.
International calendars and other utility classes.
-
Uses of ULocale in com.ibm.icu.lang
Methods in com.ibm.icu.lang with parameters of type ULocaleModifier and TypeMethodDescriptionstatic final int[]
Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.static String
UCharacter.toLowerCase
(ULocale locale, String str) Returns the lowercase version of the argument string.static String
UCharacter.toTitleCase
(ULocale locale, String str, BreakIterator titleIter) Returns the titlecase version of the argument string.static String
UCharacter.toTitleCase
(ULocale locale, String str, BreakIterator titleIter, int options) Returns the titlecase version of the argument string.static String
UCharacter.toUpperCase
(ULocale locale, 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 ULocaleModifier and TypeMethodDescriptionULocale version of theUnlocalizedNumberFormatter.locale(Locale)
setter above.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.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. -
Uses of ULocale in com.ibm.icu.text
Fields in com.ibm.icu.text declared as ULocaleModifier and TypeFieldDescriptionfinal ULocale
LocaleDisplayNames.UiListItem.minimized
Returns the minimized locale for an input locale, such as sr-Cyrl → srfinal ULocale
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 listMethods in com.ibm.icu.text that return ULocaleModifier and TypeMethodDescriptionstatic ULocale[]
BreakIterator.getAvailableULocales()
Returns a list of locales for which BreakIterators can be used.static final ULocale[]
Collator.getAvailableULocales()
Returns the set of locales, as ULocale objects, for which collators are installed.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.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 final ULocale
Collator.getFunctionalEquivalent
(String keyword, ULocale locID) Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.static final ULocale
Collator.getFunctionalEquivalent
(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.final ULocale
BreakIterator.getLocale
(ULocale.Type type) Returns the locale that was used to create this object, or null.Collator.getLocale
(ULocale.Type type) Returns the locale that was used to create this object, or null.CurrencyPluralInfo.getLocale()
Get localefinal ULocale
DateFormatSymbols.getLocale
(ULocale.Type type) Returns the locale that was used to create this object, or null.final ULocale
DecimalFormatSymbols.getLocale
(ULocale.Type type) Returns the locale that was used to create this object, or null.ListFormatter.getLocale()
Deprecated.This API is ICU internal only.abstract ULocale
LocaleDisplayNames.getLocale()
Returns the locale used to determine the display names.final ULocale
MeasureFormat.getLocale()
Get the locale of this instance.RuleBasedCollator.getLocale
(ULocale.Type type) Returns the locale that was used to create this object, or null.final 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.DecimalFormatSymbols.getULocale()
Returns the locale for which this object was constructed.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 ULocaleModifier and TypeMethodDescriptionSpoofChecker.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 ULocaleModifier and TypeMethodDescriptionAdd more index characters (aside from what are in the locale)Collator.CollatorFactory.createCollator
(ULocale loc) Return an instance of the appropriate collator.NumberFormat.NumberFormatFactory.createFormat
(ULocale loc, int formatType) Returns a number format of the appropriate type.final PluralRules
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
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
.Deprecated.ICU 54static BreakIterator
BreakIterator.getBreakInstance
(ULocale where, int kind) Deprecated.This API is ICU internal only.static BreakIterator
BreakIterator.getCharacterInstance
(ULocale where) Returns a new instance of BreakIterator that locates logical-character boundaries.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 ResourceBundle
DateFormatSymbols.getDateFormatBundle
(Calendar cal, ULocale locale) Deprecated.ICU 4.0static ResourceBundle
DateFormatSymbols.getDateFormatBundle
(Class<? extends Calendar> calendarClass, ULocale locale) Deprecated.ICU 4.0static final DateFormat
DateFormat.getDateInstance
(int style, ULocale locale) Returns the date formatter with the given formatting style for the given locale.static final 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 final DateFormat
DateFormat.getDateTimeInstance
(int dateStyle, int timeStyle, ULocale locale) Returns the date/time formatter with the given formatting styles for the given locale.static final 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
.Collator.CollatorFactory.getDisplayName
(ULocale objectLocale, ULocale displayLocale) Return the name of the collator for the objectLocale, localized for the displayLocale.static String
Collator.getDisplayName
(ULocale objectLocale) Returns the name of the collator for the objectLocale, localized for the defaultDISPLAY
locale.static String
Collator.getDisplayName
(ULocale objectLocale, ULocale displayLocale) Returns the name of the collator for the objectLocale, localized for the displayLocale.static String
Transliterator.getDisplayName
(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 final ULocale
Collator.getFunctionalEquivalent
(String keyword, ULocale locID) Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.static final ULocale
Collator.getFunctionalEquivalent
(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 final Collator
Collator.getInstance
(ULocale locale) Returns the Collator for the desired 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 final 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 final DateIntervalFormat
DateIntervalFormat.getInstance
(String skeleton, ULocale locale) Construct a DateIntervalFormat from skeleton and a given locale.static final DateIntervalFormat
DateIntervalFormat.getInstance
(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 final 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.static final DateFormat
DateFormat.getInstanceForSkeleton
(Calendar cal, String skeleton, ULocale locale) Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static final DateFormat
DateFormat.getInstanceForSkeleton
(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 final String[]
Collator.getKeywordValuesForLocale
(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, String beginMarkup, String endMarkup) Gets a ScientificNumberFormatter instance that uses markup for exponents for this locale.static NumberFormat
NumberFormat.getNumberInstance
(ULocale inLocale) NOTE: New users are strongly encouraged to useNumberFormatter
instead of NumberFormat.protected static String
NumberFormat.getPattern
(ULocale forLocale, int choice) Returns the pattern for the provided locale and choice.static String
NumberFormat.getPatternForStyle
(ULocale forLocale, int choice) Deprecated.This API is ICU internal only.static String
NumberFormat.getPatternForStyleAndNumberingSystem
(ULocale forLocale, String nsName, int choice) Deprecated.This API is ICU internal only.static final DateFormat
DateFormat.getPatternInstance
(Calendar cal, String skeleton, ULocale locale) Creates aDateFormat
object that can be used to format dates and times in the calendar system specified bycal
.static final DateFormat
DateFormat.getPatternInstance
(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 String
MeasureFormat.getRangeFormat
(ULocale forLocale, MeasureFormat.FormatWidth width) Deprecated.This API is ICU internal only.RuleBasedNumberFormat.getRuleSetDisplayName
(String ruleSetName, ULocale loc) Return the rule set display name for the provided rule set and locale.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 final DateFormat
DateFormat.getTimeInstance
(int style, ULocale locale) Returns the time formatter with the given formatting style for the given locale.static final 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
.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.protected void
ChineseDateFormatSymbols.initializeData
(ULocale loc, com.ibm.icu.impl.ICUResourceBundle b, String calendarType) Deprecated.ICU 50protected void
DateFormatSymbols.initializeData
(ULocale desiredLocale, com.ibm.icu.impl.ICUResourceBundle b, String calendarType) Deprecated.This API is ICU internal only.protected void
DateFormatSymbols.initializeData
(ULocale desiredLocale, String type) Initializes format symbols for the locale and calendar typeabstract String
LocaleDisplayNames.localeDisplayName
(ULocale locale) Returns the display name of the provided ulocale.static Object
BreakIterator.registerInstance
(BreakIterator iter, ULocale locale, int kind) Registers a new break iterator of the indicated kind, to use in the given locale.static final Object
Collator.registerInstance
(Collator collator, ULocale locale) Registers a collator as the default collator for the provided locale.void
Set locale.void
Sets the locale to be used for creating argument Format objects.void
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.Deprecated.ICU 53 seeMeasureFormat
.Method parameters in com.ibm.icu.text with type arguments of type ULocaleModifier and TypeMethodDescriptionLocaleDisplayNames.getUiList
(Set<ULocale> localeSet, boolean inSelf, Comparator<Object> collator) Return a list of information used to construct a UI list of locale names.abstract List
<LocaleDisplayNames.UiListItem> LocaleDisplayNames.getUiListCompareWholeItems
(Set<ULocale> localeSet, 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.SpoofChecker.Builder.setAllowedLocales
(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 ULocaleModifierConstructorDescriptionAlphabeticIndex
(ULocale locale) Create the index object.ChineseDateFormat
(String pattern, ULocale locale) Deprecated.ICU 50ChineseDateFormat
(String pattern, String override, ULocale locale) Deprecated.ICU 50ChineseDateFormatSymbols
(Calendar cal, ULocale locale) Deprecated.ICU 50ChineseDateFormatSymbols
(ULocale locale) Deprecated.ICU 50CurrencyPluralInfo
(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
(Class<? extends Calendar> calendarClass, ULocale locale) Variant of DateFormatSymbols(Calendar, ULocale) that takes the Calendar class instead of a Calendar instance.DateFormatSymbols
(ResourceBundle bundle, ULocale locale) Fetches a custom calendar's DateFormatSymbols out of the given resource bundle.DateIntervalInfo
(ULocale locale) Construct DateIntervalInfo for the given locale,DecimalFormatSymbols
(ULocale locale) Creates a DecimalFormatSymbols object for the given locale.protected
DurationFormat
(ULocale locale) Deprecated.This API is ICU internal only.MessageFormat
(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, String pattern) Creates a newPluralFormat
for a plural type, a pattern and a locale.PluralFormat
(ULocale ulocale, PluralRules rules, String pattern) Creates a new cardinal-numberPluralFormat
for a given set of rules, a pattern and a locale.PluralFormat
(ULocale ulocale, String pattern) Creates a new cardinal-numberPluralFormat
for a given pattern string and locale.RuleBasedNumberFormat
(ULocale locale, int format) Creates a RuleBasedNumberFormat from a predefined description.RuleBasedNumberFormat
(String description, ULocale locale) Creates a RuleBasedNumberFormat that behaves according to the description passed in.RuleBasedNumberFormat
(String description, String[][] localizations, ULocale locale) Creates a RuleBasedNumberFormat that behaves according to the description passed in.SimpleDateFormat
(String pattern, DateFormatSymbols formatData, ULocale loc) Deprecated.This API is ICU internal only.SimpleDateFormat
(String pattern, ULocale loc) Constructs a SimpleDateFormat using the given pattern and locale.SimpleDateFormat
(String pattern, 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
(String pattern, 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.protected
TimeZoneFormat
(ULocale locale) The protected constructor for subclassing.UiListItem
(ULocale minimized, ULocale modified, String nameInDisplayLocale, String nameInSelf) Constructor, normally only called internally. -
Uses of ULocale in com.ibm.icu.util
Fields in com.ibm.icu.util declared as ULocaleModifier and TypeFieldDescriptionstatic final ULocale
ULocale.CANADA
Useful constant for country/region.static final ULocale
ULocale.CANADA_FRENCH
Useful constant for country/region.static final ULocale
ULocale.CHINA
Useful constant for country/region.static final ULocale
ULocale.CHINESE
Useful constant for language.static final ULocale
ULocale.ENGLISH
Useful constant for language.static final ULocale
ULocale.FRANCE
Useful constant for country/region.static final ULocale
ULocale.FRENCH
Useful constant for language.static final ULocale
ULocale.GERMAN
Useful constant for language.static final ULocale
ULocale.GERMANY
Useful constant for country/region.static final ULocale
ULocale.ITALIAN
Useful constant for language.static final ULocale
ULocale.ITALY
Useful constant for country/region.static final ULocale
ULocale.JAPAN
Useful constant for country/region.static final ULocale
ULocale.JAPANESE
Useful constant for language.static final ULocale
ULocale.KOREA
Useful constant for country/region.static final ULocale
ULocale.KOREAN
Useful constant for language.static final ULocale
ULocale.PRC
Useful constant for country/region.static final ULocale
ULocale.ROOT
The root ULocale.static final ULocale
ULocale.SIMPLIFIED_CHINESE
Useful constant for language.static final ULocale
ULocale.TAIWAN
Useful constant for country/region.static final ULocale
ULocale.TRADITIONAL_CHINESE
Useful constant for language.static final ULocale
ULocale.UK
Useful constant for country/region.static final ULocale
ULocale.US
Useful constant for country/region.Methods in com.ibm.icu.util that return ULocaleModifier and TypeMethodDescriptionstatic 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
(String acceptLanguageList, boolean[] fallback) Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static ULocale
ULocale.acceptLanguage
(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.Builder.build()
Returns an instance ofULocale
created from the fields set on this builder.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
(String nonCanonicalID) Creates a ULocale from the id by first canonicalizing the id according to CLDR.static ULocale
ULocale.forLanguageTag
(String languageTag) Returns a locale for the specified IETF BCP 47 language tag string.static ULocale
Returns a ULocale object for aLocale
.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.LocaleMatcher.getBestMatch
(ULocale desiredLocale) Returns the supported locale which best matches the desired locale.LocaleMatcher.getBestMatch
(Iterable<ULocale> desiredLocales) Returns the supported locale which best matches one of the desired locales.LocaleMatcher.getBestMatch
(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.LocaleMatcher.Result.getDesiredULocale()
Returns the best-matching desired locale.ULocale.getFallback()
Returns the fallback locale for this locale.Calendar.FormatConfiguration.getLocale()
Deprecated.This API is ICU internal only.final ULocale
Calendar.getLocale
(ULocale.Type type) Returns the locale that was used to create this object, or null.GlobalizationPreferences.getLocale
(int index) Convenience function for getting the locales in priority orderLocaleMatcher.Result.getSupportedULocale()
Returns the best-matching supported locale.abstract ULocale
UResourceBundle.getULocale()
Returns the RFC 3066 conformant locale id of this resource bundle.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.setKeywordValue
(String keyword, String value) Given a keyword and a value, return a new locale with an updated keyword and value.Methods in com.ibm.icu.util that return types with arguments of type ULocaleModifier and TypeMethodDescriptionstatic Collection
<ULocale> ULocale.getAvailableLocalesByType
(ULocale.AvailableType type) Returns a list of all installed locales according to the specified type.GlobalizationPreferences.getLocales()
Get a copy of the language/locale priority listLocalePriorityList.getULocales()
Returns the locales as an immutable Set view.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.LocalePriorityList.iterator()
GlobalizationPreferences.processLocales
(List<ULocale> inputLocales) Process a language/locale priority list specified viasetLocales
.Methods in com.ibm.icu.util with parameters of type ULocaleModifier and TypeMethodDescriptionstatic 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
(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
Creates a Builder and adds locales, each with weight 1.0.static LocalePriorityList.Builder
Creates a Builder and adds a locale with a specified weight.Adds a locale with weight 1.0.Adds locales, each with weight 1.0.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.addSupportedULocale
(ULocale locale) Adds another supported locale.LocaleMatcher.canonicalize
(ULocale locale) Partially canonicalizes a locale (language).int
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.static TimeZone
TimeZone.forULocaleOrDefault
(ULocale locale) Deprecated.This API is ICU internal only.static String[]
Currency.getAvailableCurrencyCodes
(ULocale loc, Date d) Returns an array of Strings which contain the currency identifiers that are valid for the given locale on the given date.LocaleMatcher.getBestMatch
(ULocale desiredLocale) Returns the supported locale which best matches the desired locale.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
(String baseName, ULocale locale) Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.static UResourceBundle
UResourceBundle.getBundleInstance
(String baseName, ULocale locale, 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.static String
Calendar.getDateAtTimePattern
(Calendar cal, ULocale uLocale, int dateStyle) Deprecated.This API is ICU internal only.Calendar.getDateTimeFormat
(int dateStyle, int timeStyle, ULocale loc) Returns aDateFormat
appropriate to this calendar.static String
Calendar.getDateTimePattern
(Calendar cal, ULocale uLocale, int dateStyle) Deprecated.This API is ICU internal only.ULocale.getDisplayCountry
(ULocale displayLocale) Returns this locale's country localized for display in the provided locale.static String
ULocale.getDisplayCountry
(String localeID, ULocale displayLocale) Returns a locale's country localized for display in the provided locale.static String
ULocale.getDisplayKeyword
(String keyword, ULocale displayLocale) Returns a keyword localized for display in the specified locale.ULocale.getDisplayKeywordValue
(String keyword, ULocale displayLocale) Returns a keyword value localized for display in the specified locale.static String
ULocale.getDisplayKeywordValue
(String localeID, String keyword, ULocale displayLocale) Returns a keyword value localized for display in the specified locale.ULocale.getDisplayLanguage
(ULocale displayLocale) Returns this locale's language localized for display in the provided locale.static String
ULocale.getDisplayLanguage
(String localeID, ULocale displayLocale) Returns a locale's language localized for display in the provided locale.ULocale.getDisplayLanguageWithDialect
(ULocale displayLocale) Returns this locale's language localized for display in the provided locale.static String
ULocale.getDisplayLanguageWithDialect
(String localeID, ULocale displayLocale) Returns a locale's language localized for display in the provided locale.Calendar.getDisplayName
(ULocale loc) Returns the name of this calendar in the language of the given locale.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.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.final String
TimeZone.getDisplayName
(ULocale locale) Returns a name of this time zone suitable for presentation to the user in the specified locale.ULocale.getDisplayName
(ULocale displayLocale) Returns this locale name localized for display in the provided locale.static String
ULocale.getDisplayName
(String localeID, ULocale displayLocale) Returns the locale ID localized for display in the provided locale.ULocale.getDisplayNameWithDialect
(ULocale displayLocale) Returns this locale name localized for display in the provided locale.static String
ULocale.getDisplayNameWithDialect
(String localeID, ULocale displayLocale) Returns the locale ID localized for display in the provided locale.ULocale.getDisplayScript
(ULocale displayLocale) Returns this locale's script localized for display in the provided locale.static String
ULocale.getDisplayScript
(String localeID, ULocale displayLocale) Returns a locale's script localized for display in the provided locale.ULocale.getDisplayScriptInContext
(ULocale displayLocale) Deprecated.This API is ICU internal only.static String
ULocale.getDisplayScriptInContext
(String localeID, ULocale displayLocale) Deprecated.This API is ICU internal only.ULocale.getDisplayVariant
(ULocale displayLocale) Returns this locale's variant localized for display in the provided locale.static String
ULocale.getDisplayVariant
(String localeID, ULocale displayLocale) Returns a locale's variant localized for display in the provided locale.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 final LocaleData
LocaleData.getInstance
(ULocale locale) Gets the LocaleData object associated with the ULocale specified in localestatic final String[]
Calendar.getKeywordValuesForLocale
(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 final String[]
Currency.getKeywordValuesForLocale
(String key, ULocale locale, boolean commonlyUsed) Given a key and a locale, returns an array of values for the key for which data exists.static final LocaleData.MeasurementSystem
LocaleData.getMeasurementSystem
(ULocale locale) Returns the measurement system used in the locale specified by the locale.Returns the display name for the given currency in the given locale.Returns the display name for the given currency in the given locale.static final LocaleData.PaperSize
LocaleData.getPaperSize
(ULocale locale) Returns the size of paper used in the locale.static com.ibm.icu.impl.TextTrieMap
<Currency.CurrencyStringInfo> Currency.getParsingTrie
(ULocale locale, int type) Deprecated.This API is ICU internal only.static String
ULocale.getRegionForSupplementalData
(ULocale locale, boolean inferRegion) Deprecated.This API is ICU internal only.Convenience and compatibility override of getName that requests the symbol name.Returns the weight for a given language/locale, or null if there is none.protected DateFormat
Calendar.handleGetDateFormat
(String pattern, ULocale locale) Creates aDateFormat
appropriate to this calendar.protected DateFormat
Calendar.handleGetDateFormat
(String pattern, String override, ULocale locale) Creates aDateFormat
appropriate to this calendar.protected DateFormat
ChineseCalendar.handleGetDateFormat
(String pattern, String override, ULocale locale) Creates aDateFormat
appropriate to this calendar.boolean
Returns true if the pair of locales matches acceptably.double
Deprecated.ICU 65 Build and use a matcher rather than comparing pairs of locales.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.static String
Currency.parse
(ULocale locale, String text, int type, ParsePosition pos) Deprecated.This API is ICU internal only.static Object
Currency.registerInstance
(Currency currency, ULocale locale) Registers a new currency for the provided 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.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.Convenience routine for setting the language/locale priority list from a single locale/language.Resets theBuilder
to match the providedlocale
.GlobalizationPreferences.setLocales
(ULocale[] uLocales) Convenience routine for setting the language/locale priority list from an array.LocaleMatcher.Builder.setMaxDistance
(ULocale desired, ULocale supported) Sets the maximum distance for an acceptable match.Method parameters in com.ibm.icu.util with type arguments of type ULocaleModifier and TypeMethodDescriptionLocaleMatcher.getBestMatch
(Iterable<ULocale> desiredLocales) Returns the supported locale which best matches one of the desired locales.LocaleMatcher.getBestMatchResult
(Iterable<ULocale> desiredLocales) Returns the best match between the desired and supported locales.GlobalizationPreferences.processLocales
(List<ULocale> inputLocales) Process a language/locale priority list specified viasetLocales
.GlobalizationPreferences.setLocales
(List<ULocale> inputLocales) Sets the language/locale priority list.LocaleMatcher.Builder.setSupportedULocales
(Collection<ULocale> locales) Copies the supported locales, preserving iteration order.Constructors in com.ibm.icu.util with parameters of type ULocaleModifierConstructorDescriptionBuddhistCalendar
(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.protected
Constructs a calendar with the specified time zone and locale.ChineseCalendar
(TimeZone zone, ULocale locale) Construct aChineseCalendar
based on the current time with the given time zone with the given locale.protected
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.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.