00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __ULDNAMES_H__
00009 #define __ULDNAMES_H__
00010
00016 #include "unicode/utypes.h"
00017 #include "unicode/localpointer.h"
00018 #include "unicode/uscript.h"
00019 #include "unicode/udisplaycontext.h"
00020
00025 typedef enum {
00031 ULDN_STANDARD_NAMES = 0,
00037 ULDN_DIALECT_NAMES
00038 } UDialectHandling;
00039
00044 struct ULocaleDisplayNames;
00045
00050 typedef struct ULocaleDisplayNames ULocaleDisplayNames;
00051
00052 #if !UCONFIG_NO_FORMATTING
00053
00066 U_STABLE ULocaleDisplayNames * U_EXPORT2
00067 uldn_open(const char * locale,
00068 UDialectHandling dialectHandling,
00069 UErrorCode *pErrorCode);
00070
00076 U_STABLE void U_EXPORT2
00077 uldn_close(ULocaleDisplayNames *ldn);
00078
00079 #if U_SHOW_CPLUSPLUS_API
00080
00081 U_NAMESPACE_BEGIN
00082
00092 U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleDisplayNamesPointer, ULocaleDisplayNames, uldn_close);
00093
00094 U_NAMESPACE_END
00095
00096 #endif
00097
00098
00099
00107 U_STABLE const char * U_EXPORT2
00108 uldn_getLocale(const ULocaleDisplayNames *ldn);
00109
00116 U_STABLE UDialectHandling U_EXPORT2
00117 uldn_getDialectHandling(const ULocaleDisplayNames *ldn);
00118
00119
00120
00132 U_STABLE int32_t U_EXPORT2
00133 uldn_localeDisplayName(const ULocaleDisplayNames *ldn,
00134 const char *locale,
00135 UChar *result,
00136 int32_t maxResultSize,
00137 UErrorCode *pErrorCode);
00138
00139
00140
00152 U_STABLE int32_t U_EXPORT2
00153 uldn_languageDisplayName(const ULocaleDisplayNames *ldn,
00154 const char *lang,
00155 UChar *result,
00156 int32_t maxResultSize,
00157 UErrorCode *pErrorCode);
00158
00170 U_STABLE int32_t U_EXPORT2
00171 uldn_scriptDisplayName(const ULocaleDisplayNames *ldn,
00172 const char *script,
00173 UChar *result,
00174 int32_t maxResultSize,
00175 UErrorCode *pErrorCode);
00176
00188 U_STABLE int32_t U_EXPORT2
00189 uldn_scriptCodeDisplayName(const ULocaleDisplayNames *ldn,
00190 UScriptCode scriptCode,
00191 UChar *result,
00192 int32_t maxResultSize,
00193 UErrorCode *pErrorCode);
00194
00206 U_STABLE int32_t U_EXPORT2
00207 uldn_regionDisplayName(const ULocaleDisplayNames *ldn,
00208 const char *region,
00209 UChar *result,
00210 int32_t maxResultSize,
00211 UErrorCode *pErrorCode);
00212
00224 U_STABLE int32_t U_EXPORT2
00225 uldn_variantDisplayName(const ULocaleDisplayNames *ldn,
00226 const char *variant,
00227 UChar *result,
00228 int32_t maxResultSize,
00229 UErrorCode *pErrorCode);
00230
00242 U_STABLE int32_t U_EXPORT2
00243 uldn_keyDisplayName(const ULocaleDisplayNames *ldn,
00244 const char *key,
00245 UChar *result,
00246 int32_t maxResultSize,
00247 UErrorCode *pErrorCode);
00248
00261 U_STABLE int32_t U_EXPORT2
00262 uldn_keyValueDisplayName(const ULocaleDisplayNames *ldn,
00263 const char *key,
00264 const char *value,
00265 UChar *result,
00266 int32_t maxResultSize,
00267 UErrorCode *pErrorCode);
00268
00269 #ifndef U_HIDE_INTERNAL_API
00270
00284 U_INTERNAL ULocaleDisplayNames * U_EXPORT2
00285 uldn_openForContext(const char * locale, UDisplayContext *contexts,
00286 int32_t length, UErrorCode *pErrorCode);
00287
00298 U_INTERNAL UDisplayContext U_EXPORT2
00299 uldn_getContext(const ULocaleDisplayNames *ldn, UDisplayContextType type,
00300 UErrorCode *pErrorCode);
00301
00302 #endif
00303
00304 #endif
00305 #endif