public abstract class LocaleDisplayNames
extends Object
| java.lang.Object | |
| android.icu.text.LocaleDisplayNames | |
返回ULocales和ULocales组件的显示名称。 有关语言,脚本,区域,变体,键和值的更多信息,请参阅ULocale 。
Nested classes |
|
|---|---|
枚举 |
LocaleDisplayNames.DialectHandling |
公共方法(Public methods) |
|
|---|---|
abstract DisplayContext |
getContext(DisplayContext.Type type) 返回指定DisplayContext.Type的当前值。 |
abstract LocaleDisplayNames.DialectHandling |
getDialectHandling() 返回显示名称中使用的方言处理。 |
static LocaleDisplayNames |
getInstance(ULocale locale)
|
static LocaleDisplayNames |
getInstance(ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling) 返回LocaleDisplayNames的一个实例,它使用提供的dialectHandling返回格式化为提供的语言环境的名称。 |
static LocaleDisplayNames |
getInstance(Locale locale) |
static LocaleDisplayNames |
getInstance(Locale locale, DisplayContext... contexts) 返回LocaleDisplayNames的一个实例,它使用提供的DisplayContext设置返回为提供的 |
static LocaleDisplayNames |
getInstance(ULocale locale, DisplayContext... contexts) 返回LocaleDisplayNames的实例,该实例使用提供的DisplayContext设置返回为提供的语言环境格式化的名称 |
abstract ULocale |
getLocale() 返回用于确定显示名称的区域设置。 |
abstract String |
keyDisplayName(String key) 返回提供的语言环境键的显示名称。 |
abstract String |
keyValueDisplayName(String key, String value) 返回提供的值的显示名称(与提供的键一起使用)。 |
abstract String |
languageDisplayName(String lang) 返回提供的语言代码的显示名称。 |
abstract String |
localeDisplayName(Locale locale) 返回提供的语言环境的显示名称。 |
abstract String |
localeDisplayName(String localeId) 返回提供的区域设置ID的显示名称。 |
abstract String |
localeDisplayName(ULocale locale) 返回提供的ulocale的显示名称。 |
abstract String |
regionDisplayName(String region) 返回提供的区域代码的显示名称。 |
abstract String |
scriptDisplayName(String script) 返回提供的脚本代码的显示名称。 |
abstract String |
scriptDisplayName(int scriptCode) 返回提供的脚本代码的显示名称。 |
abstract String |
variantDisplayName(String variant) 返回提供的变体的显示名称。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
DisplayContext getContext (DisplayContext.Type type)
返回指定DisplayContext.Type的当前值。
| 参数(Parameters) | |
|---|---|
type |
DisplayContext.Type: the DisplayContext.Type whose value to return |
| 返回(Returns) | |
|---|---|
DisplayContext |
the current DisplayContext setting for the specified type |
LocaleDisplayNames.DialectHandling getDialectHandling ()
返回显示名称中使用的方言处理。
| 返回(Returns) | |
|---|---|
LocaleDisplayNames.DialectHandling |
the dialect handling enum |
LocaleDisplayNames getInstance (ULocale locale)
getInstance(ULocale, DialectHandling)指定STANDARD方言处理的便利超载。
| 参数(Parameters) | |
|---|---|
locale |
ULocale: the display locale |
| 返回(Returns) | |
|---|---|
LocaleDisplayNames |
a LocaleDisplayNames instance |
LocaleDisplayNames getInstance (ULocale locale, LocaleDisplayNames.DialectHandling dialectHandling)
返回LocaleDisplayNames的一个实例,它使用提供的dialectHandling返回格式化为提供的语言环境的名称。
| 参数(Parameters) | |
|---|---|
locale |
ULocale: the display locale |
dialectHandling |
LocaleDisplayNames.DialectHandling: how to select names for locales |
| 返回(Returns) | |
|---|---|
LocaleDisplayNames |
a LocaleDisplayNames instance |
LocaleDisplayNames getInstance (Locale locale)
getInstance(Locale, DisplayContext)指定 STANDARD_NAMES便利超载。
| 参数(Parameters) | |
|---|---|
locale |
Locale: the display Locale |
| 返回(Returns) | |
|---|---|
LocaleDisplayNames |
a LocaleDisplayNames instance |
LocaleDisplayNames getInstance (Locale locale, DisplayContext... contexts)
返回LocaleDisplayNames的一个实例,它使用提供的DisplayContext设置返回为提供的 Locale格式化的名称
| 参数(Parameters) | |
|---|---|
locale |
Locale: the display Locale |
contexts |
DisplayContext: one or more context settings (e.g. for dialect handling, capitalization, etc. |
| 返回(Returns) | |
|---|---|
LocaleDisplayNames |
a LocaleDisplayNames instance |
LocaleDisplayNames getInstance (ULocale locale, DisplayContext... contexts)
返回LocaleDisplayNames的实例,该实例使用提供的DisplayContext设置返回为提供的语言环境格式化的名称
| 参数(Parameters) | |
|---|---|
locale |
ULocale: the display locale |
contexts |
DisplayContext: one or more context settings (e.g. for dialect handling, capitalization, etc. |
| 返回(Returns) | |
|---|---|
LocaleDisplayNames |
a LocaleDisplayNames instance |
ULocale getLocale ()
返回用于确定显示名称的区域设置。 这不一定是传递给getInstance(ULocale)的相同区域设置。
| 返回(Returns) | |
|---|---|
ULocale |
the display locale |
String keyDisplayName (String key)
返回提供的语言环境键的显示名称。
| 参数(Parameters) | |
|---|---|
key |
String: the locale key name |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided locale key |
String keyValueDisplayName (String key, String value)
返回提供的值的显示名称(与提供的键一起使用)。
| 参数(Parameters) | |
|---|---|
key |
String: the locale key name |
value |
String: the locale key's value |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided value |
String languageDisplayName (String lang)
返回提供的语言代码的显示名称。
| 参数(Parameters) | |
|---|---|
lang |
String: the language code |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided language code |
String localeDisplayName (Locale locale)
返回提供的语言环境的显示名称。
| 参数(Parameters) | |
|---|---|
locale |
Locale: the locale whose display name to return |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided locale |
String localeDisplayName (String localeId)
返回提供的区域设置ID的显示名称。
| 参数(Parameters) | |
|---|---|
localeId |
String: the id of the locale whose display name to return |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided locale |
String localeDisplayName (ULocale locale)
返回提供的ulocale的显示名称。
| 参数(Parameters) | |
|---|---|
locale |
ULocale: the locale whose display name to return |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided locale |
String regionDisplayName (String region)
返回提供的区域代码的显示名称。
| 参数(Parameters) | |
|---|---|
region |
String: the region code |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided region code |
String scriptDisplayName (String script)
返回提供的脚本代码的显示名称。
| 参数(Parameters) | |
|---|---|
script |
String: the script code |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided script code |
String scriptDisplayName (int scriptCode)
返回提供的脚本代码的显示名称。 有关可识别的脚本代码,请参阅UScript 。
| 参数(Parameters) | |
|---|---|
scriptCode |
int: the script code number |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided script code |
String variantDisplayName (String variant)
返回提供的变体的显示名称。
| 参数(Parameters) | |
|---|---|
variant |
String: the variant string |
| 返回(Returns) | |
|---|---|
String |
the display name of the provided variant |