Modifier and Type | Class and Description |
---|---|
static class |
LocaleDisplayNames.DialectHandling
Enum used in
getInstance(ULocale, DialectHandling) . |
Modifier | Constructor and Description |
---|---|
protected |
LocaleDisplayNames()
Deprecated.
This API is ICU internal only.
|
Modifier and Type | Method and Description |
---|---|
abstract DisplayContext |
getContext(DisplayContext.Type type)
Returns the current value for a specified DisplayContext.Type.
|
abstract LocaleDisplayNames.DialectHandling |
getDialectHandling()
Returns the dialect handling used in the display names.
|
static LocaleDisplayNames |
getInstance(Locale locale)
Convenience overload of
getInstance(Locale, DisplayContext...) that specifies
DisplayContext.STANDARD_NAMES . |
static LocaleDisplayNames |
getInstance(Locale locale,
DisplayContext... contexts)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided JDK
locale, using the provided DisplayContext settings
|
static LocaleDisplayNames |
getInstance(ULocale locale)
Convenience overload of
getInstance(ULocale, DialectHandling) that specifies
STANDARD dialect handling. |
static LocaleDisplayNames |
getInstance(ULocale locale,
DisplayContext... contexts)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale,
using the provided DisplayContext settings
|
static LocaleDisplayNames |
getInstance(ULocale locale,
LocaleDisplayNames.DialectHandling dialectHandling)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale,
using the provided dialectHandling.
|
abstract ULocale |
getLocale()
Returns the locale used to determine the display names.
|
abstract String |
keyDisplayName(String key)
Returns the display name of the provided locale key.
|
abstract String |
keyValueDisplayName(String key,
String value)
Returns the display name of the provided value (used with the provided key).
|
abstract String |
languageDisplayName(String lang)
Returns the display name of the provided language code.
|
abstract String |
localeDisplayName(Locale locale)
Returns the display name of the provided locale.
|
abstract String |
localeDisplayName(String localeId)
Returns the display name of the provided locale id.
|
abstract String |
localeDisplayName(ULocale locale)
Returns the display name of the provided ulocale.
|
abstract String |
regionDisplayName(String region)
Returns the display name of the provided region code.
|
abstract String |
scriptDisplayName(int scriptCode)
Returns the display name of the provided script code.
|
abstract String |
scriptDisplayName(String script)
Returns the display name of the provided script code.
|
String |
scriptDisplayNameInContext(String script)
Deprecated.
This API is ICU internal only.
|
abstract String |
variantDisplayName(String variant)
Returns the display name of the provided variant.
|
@Deprecated protected LocaleDisplayNames()
public static LocaleDisplayNames getInstance(ULocale locale)
getInstance(ULocale, DialectHandling)
that specifies
STANDARD dialect handling.locale
- the display localepublic static LocaleDisplayNames getInstance(Locale locale)
getInstance(Locale, DisplayContext...)
that specifies
DisplayContext.STANDARD_NAMES
.locale
- the display JDK localepublic static LocaleDisplayNames getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
locale
- the display localedialectHandling
- how to select names for localespublic static LocaleDisplayNames getInstance(ULocale locale, DisplayContext... contexts)
locale
- the display localecontexts
- one or more context settings (e.g. for dialect
handling, capitalization, etc.public static LocaleDisplayNames getInstance(Locale locale, DisplayContext... contexts)
locale
- the display JDK localecontexts
- one or more context settings (e.g. for dialect
handling, capitalization, etc.public abstract ULocale getLocale()
getInstance(com.ibm.icu.util.ULocale)
.public abstract LocaleDisplayNames.DialectHandling getDialectHandling()
public abstract DisplayContext getContext(DisplayContext.Type type)
type
- the DisplayContext.Type whose value to returnpublic abstract String localeDisplayName(ULocale locale)
locale
- the locale whose display name to returnpublic abstract String localeDisplayName(Locale locale)
locale
- the locale whose display name to returnpublic abstract String localeDisplayName(String localeId)
localeId
- the id of the locale whose display name to returnpublic abstract String languageDisplayName(String lang)
lang
- the language codepublic abstract String scriptDisplayName(String script)
script
- the script code@Deprecated public String scriptDisplayNameInContext(String script)
script
- the script codepublic abstract String scriptDisplayName(int scriptCode)
UScript
for recognized script codes.scriptCode
- the script code numberpublic abstract String regionDisplayName(String region)
region
- the region codepublic abstract String variantDisplayName(String variant)
variant
- the variant stringpublic abstract String keyDisplayName(String key)
key
- the locale key namepublic abstract String keyValueDisplayName(String key, String value)
key
- the locale key namevalue
- the locale key's valueCopyright (c) 2014 IBM Corporation and others.