00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __ULDNAMES_H__
00011 #define __ULDNAMES_H__
00012
00018 #include "unicode/utypes.h"
00019 #include "unicode/localpointer.h"
00020 #include "unicode/uscript.h"
00021 #include "unicode/udisplaycontext.h"
00022
00027 typedef enum {
00033 ULDN_STANDARD_NAMES = 0,
00039 ULDN_DIALECT_NAMES
00040 } UDialectHandling;
00041
00046 struct ULocaleDisplayNames;
00047
00052 typedef struct ULocaleDisplayNames ULocaleDisplayNames;
00053
00054 #if !UCONFIG_NO_FORMATTING
00055
00068 U_STABLE ULocaleDisplayNames * U_EXPORT2
00069 uldn_open(const char * locale,
00070 UDialectHandling dialectHandling,
00071 UErrorCode *pErrorCode);
00072
00078 U_STABLE void U_EXPORT2
00079 uldn_close(ULocaleDisplayNames *ldn);
00080
00081 #if U_SHOW_CPLUSPLUS_API
00082
00083 U_NAMESPACE_BEGIN
00084
00094 U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDisplayNamesPointer, ULocaleDisplayNames, uldn_close);
00095
00096 U_NAMESPACE_END
00097
00098 #endif
00099
00100
00101
00109 U_STABLE const char * U_EXPORT2
00110 uldn_getLocale(const ULocaleDisplayNames *ldn);
00111
00118 U_STABLE UDialectHandling U_EXPORT2
00119 uldn_getDialectHandling(const ULocaleDisplayNames *ldn);
00120
00121
00122
00134 U_STABLE int32_t U_EXPORT2
00135 uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
00136 const char *locale,
00137 UChar *result,
00138 int32_t maxResultSize,
00139 UErrorCode *pErrorCode);
00140
00141
00142
00154 U_STABLE int32_t U_EXPORT2
00155 uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
00156 const char *lang,
00157 UChar *result,
00158 int32_t maxResultSize,
00159 UErrorCode *pErrorCode);
00160
00172 U_STABLE int32_t U_EXPORT2
00173 uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
00174 const char *script,
00175 UChar *result,
00176 int32_t maxResultSize,
00177 UErrorCode *pErrorCode);
00178
00190 U_STABLE int32_t U_EXPORT2
00191 uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
00192 UScriptCode scriptCode,
00193 UChar *result,
00194 int32_t maxResultSize,
00195 UErrorCode *pErrorCode);
00196
00208 U_STABLE int32_t U_EXPORT2
00209 uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
00210 const char *region,
00211 UChar *result,
00212 int32_t maxResultSize,
00213 UErrorCode *pErrorCode);
00214
00226 U_STABLE int32_t U_EXPORT2
00227 uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
00228 const char *variant,
00229 UChar *result,
00230 int32_t maxResultSize,
00231 UErrorCode *pErrorCode);
00232
00244 U_STABLE int32_t U_EXPORT2
00245 uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
00246 const char *key,
00247 UChar *result,
00248 int32_t maxResultSize,
00249 UErrorCode *pErrorCode);
00250
00263 U_STABLE int32_t U_EXPORT2
00264 uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
00265 const char *key,
00266 const char *value,
00267 UChar *result,
00268 int32_t maxResultSize,
00269 UErrorCode *pErrorCode);
00270
00285 U_STABLE ULocaleDisplayNames * U_EXPORT2
00286 uldn_openForContext(const char * locale, UDisplayContext *contexts,
00287 int32_t length, UErrorCode *pErrorCode);
00288
00299 U_STABLE UDisplayContext U_EXPORT2
00300 uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
00301 UErrorCode *pErrorCode);
00302
00303 #endif
00304 #endif