com.ibm.icu.text
Class LocaleDisplayNames

java.lang.Object
  extended by com.ibm.icu.text.LocaleDisplayNames

public abstract class LocaleDisplayNames
extends java.lang.Object

Returns display names of ULocales and components of ULocales. For more information on language, script, region, variant, key, and values, see ULocale.

Status:
Draft ICU 4.4.

Nested Class Summary
static class LocaleDisplayNames.DialectHandling
          Enum used in getInstance(ULocale, DialectHandling).
 
Constructor Summary
protected LocaleDisplayNames()
          Deprecated. This API is ICU internal only.
 
Method Summary
abstract  LocaleDisplayNames.DialectHandling getDialectHandling()
          Returns the dialect handling used in the display names.
static LocaleDisplayNames getInstance(ULocale locale)
          Convenience overload of getInstance(ULocale, DialectHandling) that specifies STANDARD dialect handling.
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  java.lang.String keyDisplayName(java.lang.String key)
          Returns the display name of the provided locale key.
abstract  java.lang.String keyValueDisplayName(java.lang.String key, java.lang.String value)
          Returns the display name of the provided value (used with the provided key).
abstract  java.lang.String languageDisplayName(java.lang.String lang)
          Returns the display name of the provided language code.
abstract  java.lang.String localeDisplayName(java.util.Locale locale)
          Returns the display name of the provided locale.
abstract  java.lang.String localeDisplayName(java.lang.String localeId)
          Returns the display name of the provided locale id.
abstract  java.lang.String localeDisplayName(ULocale locale)
          Returns the display name of the provided ulocale.
abstract  java.lang.String regionDisplayName(java.lang.String region)
          Returns the display name of the provided region code.
abstract  java.lang.String scriptDisplayName(int scriptCode)
          Returns the display name of the provided script code.
abstract  java.lang.String scriptDisplayName(java.lang.String script)
          Returns the display name of the provided script code.
abstract  java.lang.String variantDisplayName(java.lang.String variant)
          Returns the display name of the provided variant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleDisplayNames

protected LocaleDisplayNames()
Deprecated. This API is ICU internal only.

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Status:
Internal. This API is ICU internal only.
Method Detail

getInstance

public static LocaleDisplayNames getInstance(ULocale locale)
Convenience overload of getInstance(ULocale, DialectHandling) that specifies STANDARD dialect handling.

Parameters:
locale - the display locale
Returns:
a LocaleDisplayNames instance
Status:
Draft ICU 4.4.

getInstance

public 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.

Parameters:
locale - the display locale
dialectHandling - how to select names for locales
Returns:
a LocaleDisplayNames instance
Status:
Draft ICU 4.4.

getLocale

public abstract ULocale getLocale()
Returns the locale used to determine the display names. This is not necessarily the same locale passed to getInstance(com.ibm.icu.util.ULocale).

Returns:
the display locale
Status:
Draft ICU 4.4.

getDialectHandling

public abstract LocaleDisplayNames.DialectHandling getDialectHandling()
Returns the dialect handling used in the display names.

Returns:
the dialect handling enum
Status:
Draft ICU 4.4.

localeDisplayName

public abstract java.lang.String localeDisplayName(ULocale locale)
Returns the display name of the provided ulocale.

Parameters:
locale - the locale whose display name to return
Returns:
the display name of the provided locale
Status:
Draft ICU 4.4.

localeDisplayName

public abstract java.lang.String localeDisplayName(java.util.Locale locale)
Returns the display name of the provided locale.

Parameters:
locale - the locale whose display name to return
Returns:
the display name of the provided locale
Status:
Draft ICU 4.4.

localeDisplayName

public abstract java.lang.String localeDisplayName(java.lang.String localeId)
Returns the display name of the provided locale id.

Parameters:
localeId - the id of the locale whose display name to return
Returns:
the display name of the provided locale
Status:
Draft ICU 4.4.

languageDisplayName

public abstract java.lang.String languageDisplayName(java.lang.String lang)
Returns the display name of the provided language code.

Parameters:
lang - the language code
Returns:
the display name of the provided language code
Status:
Draft ICU 4.4.

scriptDisplayName

public abstract java.lang.String scriptDisplayName(java.lang.String script)
Returns the display name of the provided script code.

Parameters:
script - the script code
Returns:
the display name of the provided script code
Status:
Draft ICU 4.4.

scriptDisplayName

public abstract java.lang.String scriptDisplayName(int scriptCode)
Returns the display name of the provided script code. See UScript for recognized script codes.

Parameters:
scriptCode - the script code number
Returns:
the display name of the provided script code
Status:
Draft ICU 4.4.

regionDisplayName

public abstract java.lang.String regionDisplayName(java.lang.String region)
Returns the display name of the provided region code.

Parameters:
region - the region code
Returns:
the display name of the provided region code
Status:
Draft ICU 4.4.

variantDisplayName

public abstract java.lang.String variantDisplayName(java.lang.String variant)
Returns the display name of the provided variant.

Parameters:
variant - the variant string
Returns:
the display name of the provided variant
Status:
Draft ICU 4.4.

keyDisplayName

public abstract java.lang.String keyDisplayName(java.lang.String key)
Returns the display name of the provided locale key.

Parameters:
key - the locale key name
Returns:
the display name of the provided locale key
Status:
Draft ICU 4.4.

keyValueDisplayName

public abstract java.lang.String keyValueDisplayName(java.lang.String key,
                                                     java.lang.String value)
Returns the display name of the provided value (used with the provided key).

Parameters:
key - the locale key name
value - the locale key's value
Returns:
the display name of the provided value
Status:
Draft ICU 4.4.


Copyright (c) 2011 IBM Corporation and others.