ICU 57.1 57.1
uldnames.h
Go to the documentation of this file.
1/*
2*******************************************************************************
3* Copyright (C) 2010-2016, International Business Machines Corporation and
4* others. All Rights Reserved.
5*******************************************************************************
6*/
7
8#ifndef __ULDNAMES_H__
9#define __ULDNAMES_H__
10
16#include "unicode/utypes.h"
18#include "unicode/uscript.h"
20
39
45
51
52#if !UCONFIG_NO_FORMATTING
53
67uldn_open(const char * locale,
70
78
79#if U_SHOW_CPLUSPLUS_API
80
82
93
95
96#endif
97
98/* getters for state */
99
107U_STABLE const char * U_EXPORT2
109
118
119/* names for entire locales */
120
132U_STABLE int32_t U_EXPORT2
134 const char *locale,
135 UChar *result,
136 int32_t maxResultSize,
138
139/* names for components of a locale */
140
152U_STABLE int32_t U_EXPORT2
154 const char *lang,
155 UChar *result,
156 int32_t maxResultSize,
158
170U_STABLE int32_t U_EXPORT2
172 const char *script,
173 UChar *result,
174 int32_t maxResultSize,
176
188U_STABLE int32_t U_EXPORT2
191 UChar *result,
192 int32_t maxResultSize,
194
206U_STABLE int32_t U_EXPORT2
208 const char *region,
209 UChar *result,
210 int32_t maxResultSize,
212
224U_STABLE int32_t U_EXPORT2
226 const char *variant,
227 UChar *result,
228 int32_t maxResultSize,
230
242U_STABLE int32_t U_EXPORT2
244 const char *key,
245 UChar *result,
246 int32_t maxResultSize,
248
261U_STABLE int32_t U_EXPORT2
263 const char *key,
264 const char *value,
265 UChar *result,
266 int32_t maxResultSize,
268
285 int32_t length, UErrorCode *pErrorCode);
286
300
301#endif /* !UCONFIG_NO_FORMATTING */
302#endif /* __ULDNAMES_H__ */
"Smart pointer" base class; do not use directly: use LocalPointer etc.
"Smart pointer" class, closes a ULocaleDisplayNames via uldn_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
C API: Display context types (enum values)
UDisplayContextType
Display context types, for getting values of a particular setting.
UDisplayContext
Display context settings.
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.
struct ULocaleDisplayNames ULocaleDisplayNames
C typedef for struct ULocaleDisplayNames.
Definition uldnames.h:50
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.
ULocaleDisplayNames * uldn_open(const char *locale, UDialectHandling dialectHandling, UErrorCode *pErrorCode)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale,...
UDialectHandling
Enum used in LocaleDisplayNames::createInstance.
Definition uldnames.h:25
@ ULDN_DIALECT_NAMES
Use dialect names, when generating a locale name, e.g.
Definition uldnames.h:37
@ ULDN_STANDARD_NAMES
Use standard names when generating a locale name, e.g.
Definition uldnames.h:31
UDialectHandling uldn_getDialectHandling(const ULocaleDisplayNames *ldn)
Returns the dialect handling used in the display names.
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).
UDisplayContext uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type, UErrorCode *pErrorCode)
Returns the UDisplayContext value for the specified UDisplayContextType.
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.
void uldn_close(ULocaleDisplayNames *ldn)
Closes a ULocaleDisplayNames instance obtained from uldn_open().
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_localeDisplayName(const ULocaleDisplayNames *ldn, const char *locale, UChar *result, int32_t maxResultSize, UErrorCode *pErrorCode)
Returns the display name of the provided locale.
ULocaleDisplayNames * uldn_openForContext(const char *locale, UDisplayContext *contexts, int32_t length, UErrorCode *pErrorCode)
Returns an instance of LocaleDisplayNames that returns names formatted for the provided locale,...
const char * uldn_getLocale(const ULocaleDisplayNames *ldn)
Returns the locale used to determine the display names.
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.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Definition umachine.h:312
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition umachine.h:109
C API: Unicode Script Information.
UScriptCode
Constants for ISO 15924 script codes.
Definition uscript.h:52
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:476
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129