ICU 4.8.1.1  4.8.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
LocaleDisplayNames Class Referenceabstract

Returns display names of Locales and components of Locales. More...

#include <locdspnm.h>

Inheritance diagram for LocaleDisplayNames:
UObject UMemory

Public Member Functions

virtual ~LocaleDisplayNames ()
 Destructor. More...
 
virtual const LocalegetLocale () const =0
 Returns the locale used to determine the display names. More...
 
virtual UDialectHandling getDialectHandling () const =0
 Returns the dialect handling used in the display names. More...
 
virtual UnicodeStringlocaleDisplayName (const Locale &locale, UnicodeString &result) const =0
 Returns the display name of the provided locale. More...
 
virtual UnicodeStringlocaleDisplayName (const char *localeId, UnicodeString &result) const =0
 Returns the display name of the provided locale id. More...
 
virtual UnicodeStringlanguageDisplayName (const char *lang, UnicodeString &result) const =0
 Returns the display name of the provided language code. More...
 
virtual UnicodeStringscriptDisplayName (const char *script, UnicodeString &result) const =0
 Returns the display name of the provided script code. More...
 
virtual UnicodeStringscriptDisplayName (UScriptCode scriptCode, UnicodeString &result) const =0
 Returns the display name of the provided script code. More...
 
virtual UnicodeStringregionDisplayName (const char *region, UnicodeString &result) const =0
 Returns the display name of the provided region code. More...
 
virtual UnicodeStringvariantDisplayName (const char *variant, UnicodeString &result) const =0
 Returns the display name of the provided variant. More...
 
virtual UnicodeStringkeyDisplayName (const char *key, UnicodeString &result) const =0
 Returns the display name of the provided locale key. More...
 
virtual UnicodeStringkeyValueDisplayName (const char *key, const char *value, UnicodeString &result) const =0
 Returns the display name of the provided value (used with the provided key). More...
 
- Public Member Functions inherited from UObject
virtual ~UObject ()
 Destructor. More...
 

Static Public Member Functions

static LocaleDisplayNamescreateInstance (const Locale &locale)
 Convenience overload of createInstance(const Locale& locale, UDialectHandling dialectHandling) that specifies STANDARD dialect handling. More...
 
static LocaleDisplayNamescreateInstance (const Locale &locale, UDialectHandling dialectHandling)
 Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling. More...
 
- Static Public Member Functions inherited from UMemory
static void * operator new (size_t size)
 Override for ICU4C C++ memory management. More...
 
static void * operator new[] (size_t size)
 Override for ICU4C C++ memory management. More...
 
static void operator delete (void *p)
 Override for ICU4C C++ memory management. More...
 
static void operator delete[] (void *p)
 Override for ICU4C C++ memory management. More...
 
static void * operator new (size_t, void *ptr)
 Override for ICU4C C++ memory management for STL. More...
 
static void operator delete (void *, void *)
 Override for ICU4C C++ memory management for STL. More...
 

Detailed Description

Returns display names of Locales and components of Locales.

For more information on language, script, region, variant, key, and values, see Locale.

Stable:
ICU 4.4

Definition at line 32 of file locdspnm.h.

Constructor & Destructor Documentation

LocaleDisplayNames::~LocaleDisplayNames ( )
inlinevirtual

Destructor.

Stable:
ICU 4.4

Definition at line 177 of file locdspnm.h.

Member Function Documentation

LocaleDisplayNames * LocaleDisplayNames::createInstance ( const Locale locale)
inlinestatic

Convenience overload of createInstance(const Locale& locale, UDialectHandling dialectHandling) that specifies STANDARD dialect handling.

Parameters
localethe display locale
Returns
a LocaleDisplayNames instance
Stable:
ICU 4.4

Definition at line 180 of file locdspnm.h.

References ULDN_STANDARD_NAMES.

static LocaleDisplayNames* LocaleDisplayNames::createInstance ( const Locale locale,
UDialectHandling  dialectHandling 
)
static

Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling.

Parameters
localethe display locale
dialectHandlinghow to select names for locales
Returns
a LocaleDisplayNames instance
Stable:
ICU 4.4
virtual UDialectHandling LocaleDisplayNames::getDialectHandling ( ) const
pure virtual

Returns the dialect handling used in the display names.

Returns
the dialect handling enum
Stable:
ICU 4.4
virtual const Locale& LocaleDisplayNames::getLocale ( ) const
pure virtual

Returns the locale used to determine the display names.

This is not necessarily the same locale passed to createInstance.

Returns
the display locale
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::keyDisplayName ( const char *  key,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided locale key.

Parameters
keythe locale key name
resultreceives the locale key's display name
Returns
the display name of the provided locale key
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::keyValueDisplayName ( const char *  key,
const char *  value,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided value (used with the provided key).

Parameters
keythe locale key name
valuethe locale key's value
resultreceives the value's display name
Returns
the display name of the provided value
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::languageDisplayName ( const char *  lang,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided language code.

Parameters
langthe language code
resultreceives the language code's display name
Returns
the display name of the provided language code
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::localeDisplayName ( const Locale locale,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided locale.

Parameters
localethe locale whose display name to return
resultreceives the locale's display name
Returns
the display name of the provided locale
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::localeDisplayName ( const char *  localeId,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided locale id.

Parameters
localeIdthe id of the locale whose display name to return
resultreceives the locale's display name
Returns
the display name of the provided locale
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::regionDisplayName ( const char *  region,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided region code.

Parameters
regionthe region code
resultreceives the region code's display name
Returns
the display name of the provided region code
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::scriptDisplayName ( const char *  script,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided script code.

Parameters
scriptthe script code
resultreceives the script code's display name
Returns
the display name of the provided script code
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::scriptDisplayName ( UScriptCode  scriptCode,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided script code.

Parameters
scriptCodethe script code number
resultreceives the script code's display name
Returns
the display name of the provided script code
Stable:
ICU 4.4
virtual UnicodeString& LocaleDisplayNames::variantDisplayName ( const char *  variant,
UnicodeString result 
) const
pure virtual

Returns the display name of the provided variant.

Parameters
variantthe variant string
resultreceives the variant's display name
Returns
the display name of the provided variant
Stable:
ICU 4.4

The documentation for this class was generated from the following file: