ICU 4.8.1.1
4.8.1.1
|
C++ API: Provides display names of Locale ids and their components. More...
Go to the source code of this file.
Typedefs | |
typedef struct ULocaleDisplayNames | ULocaleDisplayNames |
C typedef for struct ULocaleDisplayNames. | |
Enumerations | |
enum | UDialectHandling { ULDN_STANDARD_NAMES = 0, ULDN_DIALECT_NAMES } |
Enum used in LocaleDisplayNames::createInstance. More... | |
Functions | |
ULocaleDisplayNames * | uldn_open (const char *locale, UDialectHandling dialectHandling, UErrorCode *pErrorCode) |
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling. | |
void | uldn_close (ULocaleDisplayNames *ldn) |
Closes a ULocaleDisplayNames instance obtained from uldn_open(). | |
const char * | uldn_getLocale (const ULocaleDisplayNames *ldn) |
Returns the locale used to determine the display names. | |
UDialectHandling | uldn_getDialectHandling (const ULocaleDisplayNames *ldn) |
Returns the dialect handling used in the display names. | |
int32_t | uldn_localeDisplayName (const ULocaleDisplayNames *ldn, const char *locale, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided locale. | |
int32_t | uldn_languageDisplayName (const ULocaleDisplayNames *ldn, const char *lang, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided language code. | |
int32_t | uldn_scriptDisplayName (const ULocaleDisplayNames *ldn, const char *script, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided script. | |
int32_t | uldn_scriptCodeDisplayName (const ULocaleDisplayNames *ldn, UScriptCode scriptCode, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided script code. | |
int32_t | uldn_regionDisplayName (const ULocaleDisplayNames *ldn, const char *region, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided region code. | |
int32_t | uldn_variantDisplayName (const ULocaleDisplayNames *ldn, const char *variant, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided variant. | |
int32_t | uldn_keyDisplayName (const ULocaleDisplayNames *ldn, const char *key, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided locale key. | |
int32_t | uldn_keyValueDisplayName (const ULocaleDisplayNames *ldn, const char *key, const char *value, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode) |
Returns the display name of the provided value (used with the provided key). |
C++ API: Provides display names of Locale ids and their components.
Definition in file uldnames.h.
typedef struct ULocaleDisplayNames ULocaleDisplayNames |
enum UDialectHandling |
Enum used in LocaleDisplayNames::createInstance.
ULDN_STANDARD_NAMES |
Use standard names when generating a locale name, e.g. en_GB displays as 'English (United Kingdom)'.
|
ULDN_DIALECT_NAMES |
Use dialect names, when generating a locale name, e.g. en_GB displays as 'British English'.
|
Definition at line 24 of file uldnames.h.
void uldn_close | ( | ULocaleDisplayNames * | ldn | ) |
Closes a ULocaleDisplayNames instance obtained from uldn_open().
ldn | the ULocaleDisplayNames instance to be closed |
UDialectHandling uldn_getDialectHandling | ( | const ULocaleDisplayNames * | ldn | ) |
Returns the dialect handling used in the display names.
ldn | the LocaleDisplayNames instance |
const char* uldn_getLocale | ( | const ULocaleDisplayNames * | ldn | ) |
Returns the locale used to determine the display names.
This is not necessarily the same locale passed to uldn_open.
ldn | the LocaleDisplayNames instance |
int32_t uldn_keyDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | key, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided locale key.
ldn | the LocaleDisplayNames instance |
key | the locale key whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
int32_t uldn_keyValueDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | key, | ||
const char * | value, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided value (used with the provided key).
ldn | the LocaleDisplayNames instance |
key | the locale key |
value | the locale key's value |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
int32_t uldn_languageDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | lang, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided language code.
ldn | the LocaleDisplayNames instance |
lang | the language code whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
int32_t uldn_localeDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | locale, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided locale.
ldn | the LocaleDisplayNames instance |
locale | the locale whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
ULocaleDisplayNames* uldn_open | ( | const char * | locale, |
UDialectHandling | dialectHandling, | ||
UErrorCode * | pErrorCode | ||
) |
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale, using the provided dialectHandling.
The usual value for dialectHandling is ULOC_STANDARD_NAMES.
locale | the display locale |
dialectHandling | how to select names for locales |
pErrorCode | the status code |
int32_t uldn_regionDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | region, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided region code.
ldn | the LocaleDisplayNames instance |
region | the region code whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
int32_t uldn_scriptCodeDisplayName | ( | const ULocaleDisplayNames * | ldn, |
UScriptCode | scriptCode, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided script code.
ldn | the LocaleDisplayNames instance |
scriptCode | the script code whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
int32_t uldn_scriptDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | script, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided script.
ldn | the LocaleDisplayNames instance |
script | the script whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |
int32_t uldn_variantDisplayName | ( | const ULocaleDisplayNames * | ldn, |
const char * | variant, | ||
UChar * | result, | ||
int32_t | maxResultSize, | ||
UErrorCode * | pErrorCode | ||
) |
Returns the display name of the provided variant.
ldn | the LocaleDisplayNames instance |
variant | the variant whose display name to return |
result | receives the display name |
maxResultSize | the size of the result buffer |
pErrorCode | the status code |