Uses of Class
com.ibm.icu.util.ULocale
-
Packages that use ULocale Package Description 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.segmenter 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.lang
Methods in com.ibm.icu.lang with parameters of type ULocale Modifier and Type Method Description static int[]UScript. getCode(ULocale locale)Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.static StringUCharacter. toLowerCase(ULocale locale, String str)Returns the lowercase version of the argument string.static StringUCharacter. toTitleCase(ULocale locale, String str, BreakIterator titleIter)Returns the titlecase version of the argument string.static StringUCharacter. toTitleCase(ULocale locale, String str, BreakIterator titleIter, int options)Returns the titlecase version of the argument string.static StringUCharacter. 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 ULocale Modifier and Type Method Description LocalizedNumberFormatterUnlocalizedNumberFormatter. locale(ULocale locale)ULocale version of theUnlocalizedNumberFormatter.locale(Locale)setter above.LocalizedNumberRangeFormatterUnlocalizedNumberRangeFormatter. locale(ULocale locale)ULocale version of theUnlocalizedNumberRangeFormatter.locale(Locale)setter above.static LocalizedNumberFormatterNumberFormatter. 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 LocalizedNumberRangeFormatterNumberRangeFormatter. 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.segmenter
Methods in com.ibm.icu.segmenter with parameters of type ULocale Modifier and Type Method Description LocalizedSegmenter.BuilderLocalizedSegmenter.Builder. setLocale(ULocale locale)Set the locale for which segmentation rules will be loaded -
Uses of ULocale in com.ibm.icu.text
Fields in com.ibm.icu.text declared as ULocale Modifier and Type Field Description ULocaleLocaleDisplayNames.UiListItem. minimizedReturns the minimized locale for an input locale, such as sr-Cyrl → srULocaleLocaleDisplayNames.UiListItem. modifiedReturns 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 ULocale Modifier and Type Method Description static ULocale[]BreakIterator. getAvailableULocales()[icu] Returns a list of locales for which BreakIterators can be used.static ULocale[]Collator. getAvailableULocales()[icu] Returns the set of locales, as ULocale objects, for which collators are installed.static ULocale[]DateFormat. getAvailableULocales()[icu] Returns the set of locales for which DateFormats are installed.static ULocale[]DateFormatSymbols. getAvailableULocales()[icu] Returns an array of all locales for which thegetInstancemethods of this class can return localized instances.static ULocale[]DecimalFormatSymbols. getAvailableULocales()[icu] Returns an array of all locales for which thegetInstancemethods of this class can return localized instances.static ULocale[]NumberFormat. getAvailableULocales()[icu] 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 ULocaleCollator. getFunctionalEquivalent(String keyword, ULocale locID)[icu] Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.static ULocaleCollator. getFunctionalEquivalent(String keyword, ULocale locID, boolean[] isAvailable)[icu] Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.abstract ULocalePluralRules.Factory. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)Deprecated.This API is ICU internal only.static ULocalePluralRules. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)Returns the 'functionally equivalent' locale with respect to plural rules.ULocaleBreakIterator. getLocale(ULocale.Type type)[icu] Returns the locale that was used to create this object, or null.ULocaleCollator. getLocale(ULocale.Type type)[icu] Returns the locale that was used to create this object, or null.ULocaleCurrencyPluralInfo. getLocale()Get localeULocaleDateFormatSymbols. getLocale(ULocale.Type type)Returns the locale that was used to create this object, or null.ULocaleDecimalFormatSymbols. getLocale(ULocale.Type type)[icu] Returns the locale that was used to create this object, or null.ULocaleListFormatter. getLocale()Deprecated.This API is ICU internal only.abstract ULocaleLocaleDisplayNames. getLocale()Returns the locale used to determine the display names.ULocaleMeasureFormat. getLocale()Get the locale of this instance.ULocaleRuleBasedCollator. getLocale(ULocale.Type type)[icu] Returns the locale that was used to create this object, or null.ULocaleUFormat. 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 ULocaleCurrencyDisplayNames. getULocale()Returns the locale used to determine how to translate the currency names.ULocaleDecimalFormatSymbols. getULocale()Returns the locale for which this object was constructed.ULocaleMessageFormat. getULocale()[icu] 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 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 AlphabeticIndex<V>AlphabeticIndex. addLabels(ULocale... additions)Add more index characters (aside from what are in the locale)CollatorCollator.CollatorFactory. createCollator(ULocale loc)Return an instance of the appropriate collator.NumberFormatNumberFormat.NumberFormatFactory. createFormat(ULocale loc, int formatType)Returns a number format of the appropriate type.PluralRulesPluralRules.Factory. forLocale(ULocale locale)Deprecated.This API is ICU internal only.abstract PluralRulesPluralRules.Factory. forLocale(ULocale locale, PluralRules.PluralType type)Deprecated.This API is ICU internal only.static PluralRulesPluralRules. forLocale(ULocale locale)Provides access to the predefined cardinal-numberPluralRulesfor a given locale.static PluralRulesPluralRules. forLocale(ULocale locale, PluralRules.PluralType type)Provides access to the predefinedPluralRulesfor a given locale and the plural type.static DecimalFormatSymbolsDecimalFormatSymbols. forNumberingSystem(ULocale locale, NumberingSystem ns)[icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the givenNumberingSystem.RbnfLenientScannerRbnfLenientScannerProvider. get(ULocale locale, String extras)Deprecated.ICU 54static BreakIteratorBreakIterator. getBreakInstance(ULocale where, int kind)Deprecated.This API is ICU internal only.static BreakIteratorBreakIterator. getCharacterInstance(ULocale where)[icu] Returns a new instance of BreakIterator that locates logical-character boundaries.static MeasureFormatMeasureFormat. getCurrencyFormat(ULocale locale)Return a formatter for CurrencyAmount objects in the given locale.static NumberFormatNumberFormat. getCurrencyInstance(ULocale inLocale)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static ResourceBundleDateFormatSymbols. getDateFormatBundle(Calendar cal, ULocale locale)Deprecated.ICU 4.0static ResourceBundleDateFormatSymbols. getDateFormatBundle(Class<? extends Calendar> calendarClass, ULocale locale)Deprecated.ICU 4.0static DateFormatDateFormat. getDateInstance(int style, ULocale locale)Returns the date formatter with the given formatting style for the given locale.static DateFormatDateFormat. getDateInstance(Calendar cal, int dateStyle, ULocale locale)Creates aDateFormatobject that can be used to format dates in the calendar system specified bycal.static DateFormatDateFormat. getDateTimeInstance(int dateStyle, int timeStyle, ULocale locale)Returns the date/time formatter with the given formatting styles for the given locale.static DateFormatDateFormat. getDateTimeInstance(Calendar cal, int dateStyle, int timeStyle, ULocale locale)Creates aDateFormatobject that can be used to format dates and times in the calendar system specified bycal.StringCollator.CollatorFactory. getDisplayName(ULocale objectLocale, ULocale displayLocale)Return the name of the collator for the objectLocale, localized for the displayLocale.static StringCollator. getDisplayName(ULocale objectLocale)[icu] Returns the name of the collator for the objectLocale, localized for the defaultDISPLAYlocale.static StringCollator. getDisplayName(ULocale objectLocale, ULocale displayLocale)[icu] Returns the name of the collator for the objectLocale, localized for the displayLocale.static StringTransliterator. getDisplayName(String id, ULocale inLocale)Returns a name for this transliterator that is appropriate for display to the user in the given locale.static DateTimePatternGeneratorDateTimePatternGenerator. getFrozenInstance(ULocale uLocale)Deprecated.This API is ICU internal only.static ULocaleCollator. getFunctionalEquivalent(String keyword, ULocale locID)[icu] Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.static ULocaleCollator. getFunctionalEquivalent(String keyword, ULocale locID, boolean[] isAvailable)[icu] Returns the functionally equivalent locale for the given requested locale, with respect to given keyword, for the collation service.abstract ULocalePluralRules.Factory. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)Deprecated.This API is ICU internal only.static ULocalePluralRules. getFunctionalEquivalent(ULocale locale, boolean[] isAvailable)Returns the 'functionally equivalent' locale with respect to plural rules.static CollatorCollator. getInstance(ULocale locale)[icu] Returns the Collator for the desired locale.static CompactDecimalFormatCompactDecimalFormat. getInstance(ULocale locale, CompactDecimalFormat.CompactStyle style)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static CurrencyDisplayNamesCurrencyDisplayNames. getInstance(ULocale locale)Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.static CurrencyDisplayNamesCurrencyDisplayNames. getInstance(ULocale locale, boolean noSubstitute)Return an instance of CurrencyDisplayNames that provides information localized for display in the provided locale.static CurrencyPluralInfoCurrencyPluralInfo. getInstance(ULocale locale)Gets a CurrencyPluralInfo instance for the given locale.static DateFormatDateFormat. getInstance(Calendar cal, ULocale locale)Returns a date/time formatter that uses the SHORT style for both the date and the time.static DateFormatSymbolsDateFormatSymbols. getInstance(ULocale locale)[icu] Returns a DateFormatSymbols instance for the given locale.static DateIntervalFormatDateIntervalFormat. getInstance(String skeleton, ULocale locale)Construct a DateIntervalFormat from skeleton and a given locale.static DateIntervalFormatDateIntervalFormat. getInstance(String skeleton, ULocale locale, DateIntervalInfo dtitvinf)Construct a DateIntervalFormat from skeleton a DateIntervalInfo, and the given locale.static DateTimePatternGeneratorDateTimePatternGenerator. getInstance(ULocale uLocale)Construct a flexible generator according to data for a given locale.static DecimalFormatSymbolsDecimalFormatSymbols. getInstance(ULocale locale)Returns a DecimalFormatSymbols instance for the given locale.static DurationFormatDurationFormat. getInstance(ULocale locale)Deprecated.ICU 56static FilteredBreakIteratorBuilderFilteredBreakIteratorBuilder. getInstance(ULocale where)Construct a FilteredBreakIteratorBuilder based on sentence break exception rules in a locale.static ListFormatterListFormatter. getInstance(ULocale locale)Create a list formatter that is appropriate for a locale.static ListFormatterListFormatter. getInstance(ULocale locale, ListFormatter.Type type, ListFormatter.Width width)Create a list formatter that is appropriate for a locale.static LocaleDisplayNamesLocaleDisplayNames. getInstance(ULocale locale)Convenience overload ofLocaleDisplayNames.getInstance(ULocale, DialectHandling)that specifies STANDARD dialect handling.static LocaleDisplayNamesLocaleDisplayNames. getInstance(ULocale locale, DisplayContext... contexts)Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided DisplayContext settingsstatic LocaleDisplayNamesLocaleDisplayNames. getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling.static MeasureFormatMeasureFormat. getInstance(ULocale locale, MeasureFormat.FormatWidth formatWidth)Create a format from the locale, formatWidth, and format.static MeasureFormatMeasureFormat. getInstance(ULocale locale, MeasureFormat.FormatWidth formatWidth, NumberFormat format)Create a format from the locale, formatWidth, and format.static NumberFormatNumberFormat. getInstance(ULocale inLocale)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static NumberFormatNumberFormat. getInstance(ULocale desiredLocale, int choice)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static NumberingSystemNumberingSystem. getInstance(ULocale locale)Returns the default numbering system for the specified ULocale.static RelativeDateTimeFormatterRelativeDateTimeFormatter. getInstance(ULocale locale)Returns a RelativeDateTimeFormatter for a particular locale.static RelativeDateTimeFormatterRelativeDateTimeFormatter. getInstance(ULocale locale, NumberFormat nf)Returns a RelativeDateTimeFormatter for a particular locale that uses a particular NumberFormat object.static RelativeDateTimeFormatterRelativeDateTimeFormatter. 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 TimeZoneFormatTimeZoneFormat. getInstance(ULocale locale)Returns a frozen instance ofTimeZoneFormatfor the given locale.static TimeZoneNamesTimeZoneNames. getInstance(ULocale locale)Returns an instance ofTimeZoneNamesfor the specified locale.static DateFormatDateFormat. getInstanceForSkeleton(Calendar cal, String skeleton, ULocale locale)[icu] Creates aDateFormatobject that can be used to format dates and times in the calendar system specified bycal.static DateFormatDateFormat. getInstanceForSkeleton(String skeleton, ULocale locale)[icu] Returns aDateFormatobject that can be used to format dates and times in the given locale.static DateTimePatternGeneratorDateTimePatternGenerator. getInstanceNoStdPat(ULocale uLocale)Deprecated.This API is ICU internal only.static NumberFormatNumberFormat. getIntegerInstance(ULocale inLocale)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static String[]Collator. getKeywordValuesForLocale(String key, ULocale locale, boolean commonlyUsed)[icu] Given a key and a locale, returns an array of string values in a preferred order that would make a difference.static BreakIteratorBreakIterator. getLineInstance(ULocale where)[icu] Returns a new instance of BreakIterator that locates legal line- wrapping positions.static ScientificNumberFormatterScientificNumberFormatter. getMarkupInstance(ULocale locale, String beginMarkup, String endMarkup)Gets a ScientificNumberFormatter instance that uses markup for exponents for this locale.static NumberFormatNumberFormat. getNumberInstance(ULocale inLocale)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.protected static StringNumberFormat. getPattern(ULocale forLocale, int choice)Returns the pattern for the provided locale and choice.static StringNumberFormat. getPatternForStyle(ULocale forLocale, int choice)Deprecated.This API is ICU internal only.static StringNumberFormat. getPatternForStyleAndNumberingSystem(ULocale forLocale, String nsName, int choice)Deprecated.This API is ICU internal only.static DateFormatDateFormat. getPatternInstance(Calendar cal, String skeleton, ULocale locale)[icu] Creates aDateFormatobject that can be used to format dates and times in the calendar system specified bycal.static DateFormatDateFormat. getPatternInstance(String skeleton, ULocale locale)[icu] Returns aDateFormatobject that can be used to format dates and times in the given locale.static NumberFormatNumberFormat. getPercentInstance(ULocale inLocale)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static StringMeasureFormat. getRangeFormat(ULocale forLocale, MeasureFormat.FormatWidth width)Deprecated.This API is ICU internal only.StringRuleBasedNumberFormat. 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 NumberFormatNumberFormat. getScientificInstance(ULocale inLocale)NOTE: New users are strongly encouraged to useNumberFormatterinstead of NumberFormat.static BreakIteratorBreakIterator. getSentenceInstance(ULocale where)[icu] Returns a new instance of BreakIterator that locates sentence boundaries.static ScientificNumberFormatterScientificNumberFormatter. getSuperscriptInstance(ULocale locale)Gets a ScientificNumberFormatter instance that uses superscript characters for exponents for this locale.static DateFormatDateFormat. getTimeInstance(int style, ULocale locale)Returns the time formatter with the given formatting style for the given locale.static DateFormatDateFormat. getTimeInstance(Calendar cal, int timeStyle, ULocale locale)Creates aDateFormatobject that can be used to format times in the calendar system specified bycal.abstract TimeZoneNamesTimeZoneNames.Factory. getTimeZoneNames(ULocale locale)Deprecated.This API is ICU internal only.static BreakIteratorBreakIterator. getTitleInstance(ULocale where)Deprecated.ICU 64 UseBreakIterator.getWordInstance()instead.static TimeZoneNamesTimeZoneNames. getTZDBInstance(ULocale locale)Returns an instance ofTimeZoneNamescontaining only short specific zone names (TimeZoneNames.NameType.SHORT_STANDARDandTimeZoneNames.NameType.SHORT_DAYLIGHT), compatible with the IANA tz database's zone abbreviations (not localized).static BreakIteratorBreakIterator. getWordInstance(ULocale where)[icu] Returns a new instance of BreakIterator that locates word boundaries.abstract booleanPluralRules.Factory. hasOverride(ULocale locale)Deprecated.This API is ICU internal only.protected voidChineseDateFormatSymbols. initializeData(ULocale loc, com.ibm.icu.impl.ICUResourceBundle b, String calendarType)Deprecated.ICU 50protected voidDateFormatSymbols. initializeData(ULocale desiredLocale, com.ibm.icu.impl.ICUResourceBundle b, String calendarType)Deprecated.This API is ICU internal only.protected voidDateFormatSymbols. initializeData(ULocale desiredLocale, String type)Initializes format symbols for the locale and calendar typeabstract StringLocaleDisplayNames. localeDisplayName(ULocale locale)Returns the display name of the provided ulocale.static ObjectBreakIterator. registerInstance(BreakIterator iter, ULocale locale, int kind)[icu] Registers a new break iterator of the indicated kind, to use in the given locale.static ObjectCollator. registerInstance(Collator collator, ULocale locale)[icu] Registers a collator as the default collator for the provided locale.voidCurrencyPluralInfo. setLocale(ULocale loc)Set locale.voidMessageFormat. setLocale(ULocale locale)Sets the locale to be used for creating argument Format objects.voidPluralFormat. 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.TimeUnitFormatTimeUnitFormat. setLocale(ULocale locale)Deprecated.ICU 53 seeMeasureFormat.Method parameters in com.ibm.icu.text with type arguments of type ULocale Modifier and Type Method Description List<LocaleDisplayNames.UiListItem>LocaleDisplayNames. 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.BuilderSpoofChecker.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 ULocale Constructor Description AlphabeticIndex(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 theDateFormatSymbolsobject that should be used to format a calendar system's dates in the given locale.DateFormatSymbols(ULocale locale)[icu] 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)[icu] Creates a DecimalFormatSymbols object for the given locale.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-numberPluralFormatfor a given locale.PluralFormat(ULocale ulocale, PluralRules rules)Creates a new cardinal-numberPluralFormatfor a given set of rules.PluralFormat(ULocale ulocale, PluralRules.PluralType type)Creates a newPluralFormatfor the plural type.PluralFormat(ULocale ulocale, PluralRules.PluralType type, String pattern)Creates a newPluralFormatfor a plural type, a pattern and a locale.PluralFormat(ULocale ulocale, PluralRules rules, String pattern)Creates a new cardinal-numberPluralFormatfor a given set of rules, a pattern and a locale.PluralFormat(ULocale ulocale, String pattern)Creates a new cardinal-numberPluralFormatfor 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 useMeasureFormatinstead.TimeUnitFormat(ULocale locale, int style)Deprecated.ICU 53 useMeasureFormatinstead.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 ULocale Modifier and Type Field Description static ULocaleULocale. CANADAUseful constant for country/region.static ULocaleULocale. CANADA_FRENCHUseful constant for country/region.static ULocaleULocale. CHINAUseful constant for country/region.static ULocaleULocale. CHINESEUseful constant for language.static ULocaleULocale. ENGLISHUseful constant for language.static ULocaleULocale. FRANCEUseful constant for country/region.static ULocaleULocale. FRENCHUseful constant for language.static ULocaleULocale. GERMANUseful constant for language.static ULocaleULocale. GERMANYUseful constant for country/region.static ULocaleULocale. ITALIANUseful constant for language.static ULocaleULocale. ITALYUseful constant for country/region.static ULocaleULocale. JAPANUseful constant for country/region.static ULocaleULocale. JAPANESEUseful constant for language.static ULocaleULocale. KOREAUseful constant for country/region.static ULocaleULocale. KOREANUseful constant for language.static ULocaleULocale. PRCUseful constant for country/region.static ULocaleULocale. ROOTThe root ULocale.static ULocaleULocale. SIMPLIFIED_CHINESEUseful constant for language.static ULocaleULocale. TAIWANUseful constant for country/region.static ULocaleULocale. TRADITIONAL_CHINESEUseful constant for language.static ULocaleULocale. UKUseful constant for country/region.static ULocaleULocale. USUseful constant for country/region.Methods in com.ibm.icu.util that return ULocale Modifier and Type Method Description static ULocaleULocale. acceptLanguage(ULocale[] acceptLanguageList, boolean[] fallback)[icu] Based on an ordered array of acceptable locales, determine an available locale for the user.static ULocaleULocale. acceptLanguage(ULocale[] acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)[icu] Based on a list of acceptable locales, determine an available locale for the user.static ULocaleULocale. acceptLanguage(String acceptLanguageList, boolean[] fallback)[icu] Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static ULocaleULocale. acceptLanguage(String acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)[icu] Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static ULocaleULocale. addLikelySubtags(ULocale loc)[icu] 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.ULocaleULocale.Builder. build()Returns an instance ofULocalecreated from the fields set on this builder.ULocaleLocaleMatcher. canonicalize(ULocale locale)Partially canonicalizes a locale (language).ULocaleULocale. clone()This is for compatibility with Locale-- in actuality, since ULocale is immutable, there is no reason to clone it, so this API returns 'this'.static ULocaleULocale. createCanonical(ULocale locale)Creates a ULocale from the locale by first canonicalizing the locale according to CLDR.static ULocaleULocale. createCanonical(String nonCanonicalID)[icu] Creates a ULocale from the id by first canonicalizing the id according to CLDR.static ULocaleULocale. forLanguageTag(String languageTag)Returns a locale for the specified IETF BCP 47 language tag string.static ULocaleULocale. forLocale(Locale loc)[icu] Returns a ULocale object for aLocale.static ULocale[]ULocale. getAvailableLocales()[icu] Note: Unlike the Locale API, this returns an array of
ULocale, notLocale.static ULocale[]Calendar. getAvailableULocales()[icu] 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.ULocaleLocaleMatcher. getBestMatch(ULocale desiredLocale)Returns the supported locale which best matches the desired locale.ULocaleLocaleMatcher. getBestMatch(Iterable<ULocale> desiredLocales)Returns the supported locale which best matches one of the desired locales.ULocaleLocaleMatcher. getBestMatch(String desiredLocaleList)Parses the string likeLocalePriorityListdoes and returns the supported locale which best matches one of the desired locales.static ULocaleULocale. getDefault()Returns the current default ULocale.static ULocaleULocale. getDefault(ULocale.Category category)Returns the current default ULocale for the specified category.ULocaleLocaleMatcher.Result. getDesiredULocale()Returns the best-matching desired locale.ULocaleULocale. getFallback()[icu] Returns the fallback locale for this locale.ULocaleCalendar.FormatConfiguration. getLocale()Deprecated.This API is ICU internal only.ULocaleCalendar. getLocale(ULocale.Type type)[icu] Returns the locale that was used to create this object, or null.ULocaleGlobalizationPreferences. getLocale(int index)Convenience function for getting the locales in priority orderULocaleLocaleMatcher.Result. getSupportedULocale()Returns the best-matching supported locale.abstract ULocaleUResourceBundle. getULocale()[icu] Returns the RFC 3066 conformant locale id of this resource bundle.ULocaleLocaleMatcher.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 ULocaleULocale. minimizeSubtags(ULocale loc)[icu] 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 ULocaleULocale. minimizeSubtags(ULocale loc, ULocale.Minimize fieldToFavor)Deprecated.This API is ICU internal only.ULocaleULocale. setKeywordValue(String keyword, String value)[icu] 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 ULocale Modifier and Type Method Description static Collection<ULocale>ULocale. getAvailableLocalesByType(ULocale.AvailableType type)Returns a list of all installed locales according to the specified type.List<ULocale>GlobalizationPreferences. getLocales()Get a copy of the language/locale priority listSet<ULocale>LocalePriorityList. getULocales()Returns the locales as an immutable Set view.protected 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.Iterator<ULocale>LocalePriorityList. iterator()protected List<ULocale>GlobalizationPreferences. processLocales(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 static ULocaleULocale. acceptLanguage(ULocale[] acceptLanguageList, boolean[] fallback)[icu] Based on an ordered array of acceptable locales, determine an available locale for the user.static ULocaleULocale. acceptLanguage(ULocale[] acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)[icu] Based on a list of acceptable locales, determine an available locale for the user.static ULocaleULocale. acceptLanguage(String acceptLanguageList, ULocale[] availableLocales, boolean[] fallback)[icu] Based on a HTTP formatted list of acceptable locales, determine an available locale for the user.static LocalePriorityList.BuilderLocalePriorityList. add(ULocale... locales)Creates a Builder and adds locales, each with weight 1.0.static LocalePriorityList.BuilderLocalePriorityList. add(ULocale locale, double weight)Creates a Builder and adds a locale with a specified weight.LocalePriorityList.BuilderLocalePriorityList.Builder. add(ULocale locale)Adds a locale with weight 1.0.LocalePriorityList.BuilderLocalePriorityList.Builder. add(ULocale... locales)Adds locales, each with weight 1.0.LocalePriorityList.BuilderLocalePriorityList.Builder. add(ULocale locale, double weight)Adds a locale with a specified weight.static ULocaleULocale. addLikelySubtags(ULocale loc)[icu] 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.BuilderLocaleMatcher.Builder. addSupportedULocale(ULocale locale)Adds another supported locale.ULocaleLocaleMatcher. canonicalize(ULocale locale)Partially canonicalizes a locale (language).intULocale. compareTo(ULocale other)Compares two ULocale for ordering.static ULocaleULocale. createCanonical(ULocale locale)Creates a ULocale from the locale by first canonicalizing the locale according to CLDR.static TimeZoneTimeZone. 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.ULocaleLocaleMatcher. getBestMatch(ULocale desiredLocale)Returns the supported locale which best matches the desired locale.LocaleMatcher.ResultLocaleMatcher. getBestMatchResult(ULocale desiredLocale)Returns the best match between the desired locale and the supported locales.static UResourceBundleUResourceBundle. getBundleInstance(ULocale locale)[icu] Creates a UResourceBundle for the locale specified, from which users can extract resources by using their corresponding keys.static UResourceBundleUResourceBundle. getBundleInstance(String baseName, ULocale locale)[icu] Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.static UResourceBundleUResourceBundle. getBundleInstance(String baseName, ULocale locale, ClassLoader loader)[icu] 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 StringCalendar. getDateAtTimePattern(Calendar cal, ULocale uLocale, int dateStyle)Deprecated.This API is ICU internal only.DateFormatCalendar. getDateTimeFormat(int dateStyle, int timeStyle, ULocale loc)[icu] Returns aDateFormatappropriate to this calendar.static StringCalendar. getDateTimePattern(Calendar cal, ULocale uLocale, int dateStyle)Deprecated.This API is ICU internal only.StringULocale. getDisplayCountry(ULocale displayLocale)Returns this locale's country localized for display in the provided locale.static StringULocale. getDisplayCountry(String localeID, ULocale displayLocale)[icu] Returns a locale's country localized for display in the provided locale.static StringULocale. getDisplayKeyword(String keyword, ULocale displayLocale)[icu] Returns a keyword localized for display in the specified locale.StringULocale. getDisplayKeywordValue(String keyword, ULocale displayLocale)[icu] Returns a keyword value localized for display in the specified locale.static StringULocale. getDisplayKeywordValue(String localeID, String keyword, ULocale displayLocale)[icu] Returns a keyword value localized for display in the specified locale.StringULocale. getDisplayLanguage(ULocale displayLocale)Returns this locale's language localized for display in the provided locale.static StringULocale. getDisplayLanguage(String localeID, ULocale displayLocale)[icu] Returns a locale's language localized for display in the provided locale.StringULocale. getDisplayLanguageWithDialect(ULocale displayLocale)[icu] Returns this locale's language localized for display in the provided locale.static StringULocale. getDisplayLanguageWithDialect(String localeID, ULocale displayLocale)[icu] Returns a locale's language localized for display in the provided locale.StringCalendar. getDisplayName(ULocale loc)Returns the name of this calendar in the language of the given locale.StringHoliday. getDisplayName(ULocale locale)Return the name of this holiday in the language of the specified locale Thenameparameter 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.StringTimeZone. getDisplayName(boolean daylight, int style, ULocale locale)Returns a name of this time zone suitable for presentation to the user in the specified locale.StringTimeZone. getDisplayName(ULocale locale)Returns a name of this time zone suitable for presentation to the user in the specified locale.StringULocale. getDisplayName(ULocale displayLocale)Returns this locale name localized for display in the provided locale.static StringULocale. getDisplayName(String localeID, ULocale displayLocale)[icu] Returns the locale ID localized for display in the provided locale.StringULocale. getDisplayNameWithDialect(ULocale displayLocale)[icu] Returns this locale name localized for display in the provided locale.static StringULocale. getDisplayNameWithDialect(String localeID, ULocale displayLocale)[icu] Returns the locale ID localized for display in the provided locale.StringULocale. getDisplayScript(ULocale displayLocale)Returns this locale's script localized for display in the provided locale.static StringULocale. getDisplayScript(String localeID, ULocale displayLocale)[icu] Returns a locale's script localized for display in the provided locale.StringULocale. getDisplayScriptInContext(ULocale displayLocale)Deprecated.This API is ICU internal only.static StringULocale. getDisplayScriptInContext(String localeID, ULocale displayLocale)Deprecated.This API is ICU internal only.StringULocale. getDisplayVariant(ULocale displayLocale)Returns this locale's variant localized for display in the provided locale.static StringULocale. getDisplayVariant(String localeID, ULocale displayLocale)[icu] Returns a locale's variant localized for display in the provided locale.static UnicodeSetLocaleData. getExemplarSet(ULocale locale, int options)Returns the set of exemplar characters for a locale.static UnicodeSetLocaleData. getExemplarSet(ULocale locale, int options, int extype)Returns the set of exemplar characters for a locale.static Holiday[]Holiday. getHolidays(ULocale locale)static CalendarCalendar. getInstance(TimeZone zone, ULocale locale)Returns a calendar with the specified time zone and locale.static CalendarCalendar. getInstance(ULocale locale)Returns a calendar using the default time zone and specified locale.static CurrencyCurrency. getInstance(ULocale locale)Returns a currency object for the default currency in the given locale.static GenderInfoGenderInfo. getInstance(ULocale uLocale)Deprecated.This API is ICU internal only.static LocaleDataLocaleData. getInstance(ULocale locale)Gets the LocaleData object associated with the ULocale specified in localestatic String[]Calendar. getKeywordValuesForLocale(String key, ULocale locale, boolean commonlyUsed)[icu] Given a key and a locale, returns an array of string values in a preferred order that would make a difference.static 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 LocaleData.MeasurementSystemLocaleData. getMeasurementSystem(ULocale locale)Returns the measurement system used in the locale specified by the locale.StringCurrency. getName(ULocale locale, int nameStyle, boolean[] isChoiceFormat)Returns the display name for the given currency in the given locale.StringCurrency. getName(ULocale locale, int nameStyle, String pluralCount, boolean[] isChoiceFormat)Returns the display name for the given currency in the given locale.static LocaleData.PaperSizeLocaleData. 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 StringULocale. getRegionForSupplementalData(ULocale locale, boolean inferRegion)Deprecated.This API is ICU internal only.StringCurrency. getSymbol(ULocale uloc)Convenience and compatibility override of getName that requests the symbol name.DoubleLocalePriorityList. getWeight(ULocale locale)Returns the weight for a given language/locale, or null if there is none.protected DateFormatCalendar. handleGetDateFormat(String pattern, ULocale locale)Creates aDateFormatappropriate to this calendar.protected DateFormatCalendar. handleGetDateFormat(String pattern, String override, ULocale locale)Creates aDateFormatappropriate to this calendar.protected DateFormatChineseCalendar. handleGetDateFormat(String pattern, String override, ULocale locale)Creates aDateFormatappropriate to this calendar.booleanLocaleMatcher. isMatch(ULocale desired, ULocale supported)Returns true if the pair of locales matches acceptably.doubleLocaleMatcher. match(ULocale desired, ULocale desiredMax, ULocale supported, ULocale supportedMax)Deprecated.ICU 65 Build and use a matcher rather than comparing pairs of locales.static ULocaleULocale. minimizeSubtags(ULocale loc)[icu] 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 ULocaleULocale. minimizeSubtags(ULocale loc, ULocale.Minimize fieldToFavor)Deprecated.This API is ICU internal only.static StringCurrency. parse(ULocale locale, String text, int type, ParsePosition pos)Deprecated.This API is ICU internal only.static ObjectCurrency. registerInstance(Currency currency, ULocale locale)Registers a new currency for the provided locale.static voidULocale. setDefault(ULocale newLocale)Sets the default ULocale.static voidULocale. setDefault(ULocale.Category category, ULocale newLocale)Sets the defaultULocalefor the specifiedCategory.LocaleMatcher.BuilderLocaleMatcher.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.GlobalizationPreferencesGlobalizationPreferences. setLocale(ULocale uLocale)Convenience routine for setting the language/locale priority list from a single locale/language.ULocale.BuilderULocale.Builder. setLocale(ULocale locale)Resets theBuilderto match the providedlocale.GlobalizationPreferencesGlobalizationPreferences. setLocales(ULocale[] uLocales)Convenience routine for setting the language/locale priority list from an array.LocaleMatcher.BuilderLocaleMatcher.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 ULocale Modifier and Type Method Description ULocaleLocaleMatcher. getBestMatch(Iterable<ULocale> desiredLocales)Returns the supported locale which best matches one of the desired locales.LocaleMatcher.ResultLocaleMatcher. getBestMatchResult(Iterable<ULocale> desiredLocales)Returns the best match between the desired and supported locales.protected List<ULocale>GlobalizationPreferences. processLocales(List<ULocale> inputLocales)Process a language/locale priority list specified viasetLocales.GlobalizationPreferencesGlobalizationPreferences. setLocales(List<ULocale> inputLocales)Sets the language/locale priority list.LocaleMatcher.BuilderLocaleMatcher.Builder. setSupportedULocales(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 aBuddhistCalendarbased on the current time in the given time zone with the given locale.BuddhistCalendar(ULocale locale)Constructs aBuddhistCalendarbased 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.ChineseCalendar(TimeZone zone, ULocale locale)Construct aChineseCalendarbased on the current time with the given time zone with the given locale.ChineseCalendar(TimeZone zone, ULocale locale, TimeZone zoneAstroCalc)Deprecated.This API is ICU internal only.ChineseCalendar(ULocale locale)Constructs aChineseCalendarbased on the current time in the default time zone with the given locale.CopticCalendar(TimeZone zone, ULocale locale)Constructs aCopticCalendarbased on the current time in the given time zone with the given locale.CopticCalendar(ULocale locale)Constructs aCopticCalendarbased 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 aEthiopicCalendarbased on the current time in the given time zone with the given locale.EthiopicCalendar(ULocale locale)Constructs aEthiopicCalendarbased 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)[icu] Constructs a GregorianCalendar based on the current time in the default time zone with the given locale.HebrewCalendar(TimeZone zone, ULocale locale)Constructs aHebrewCalendarbased on the current time in the given time zone with the given locale.HebrewCalendar(ULocale locale)Constructs aHebrewCalendarbased on the current time in the default time zone with the given locale.IndianCalendar(TimeZone zone, ULocale locale)Constructs aIndianCalendarbased on the current time in the given time zone with the given locale.IndianCalendar(ULocale locale)Constructs aIndianCalendarbased on the current time in the default time zone with the given locale.IslamicCalendar(TimeZone zone, ULocale locale)Constructs anIslamicCalendarbased on the current time in the given time zone with the given locale.IslamicCalendar(ULocale locale)Constructs anIslamicCalendarbased on the current time in the default time zone with the given locale.JapaneseCalendar(TimeZone zone, ULocale locale)Constructs aJapaneseCalendarbased on the current time in the given time zone with the given locale.JapaneseCalendar(ULocale locale)Constructs aJapaneseCalendarbased 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 aTaiwanCalendarbased on the current time in the given time zone with the given locale.TaiwanCalendar(ULocale locale)Constructs aTaiwanCalendarbased on the current time in the default time zone with the given locale.
-