00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef ULOC_H
00022 #define ULOC_H
00023
00024 #include "unicode/utypes.h"
00025
00198
00199
00200
00201
00202 #define ULOC_CHINESE "zh"
00203 #define ULOC_ENGLISH "en"
00204 #define ULOC_FRENCH "fr"
00205 #define ULOC_GERMAN "de"
00206 #define ULOC_ITALIAN "it"
00207 #define ULOC_JAPANESE "ja"
00208 #define ULOC_KOREAN "ko"
00209 #define ULOC_SIMPLIFIED_CHINESE "zh_CN"
00210 #define ULOC_TRADITIONAL_CHINESE "zh_TW"
00211
00214
00215
00216
00217
00218 #define ULOC_CANADA "en_CA"
00219 #define ULOC_CANADA_FRENCH "fr_CA"
00220 #define ULOC_CHINA "zh_CN"
00221 #define ULOC_PRC "zh_CN"
00222 #define ULOC_FRANCE "fr_FR"
00223 #define ULOC_GERMANY "de_DE"
00224 #define ULOC_ITALY "it_IT"
00225 #define ULOC_JAPAN "ja_JP"
00226 #define ULOC_KOREA "ko_KR"
00227 #define ULOC_TAIWAN "zh_TW"
00228 #define ULOC_UK "en_GB"
00229 #define ULOC_US "en_US"
00230
00239 #define ULOC_LANG_CAPACITY 12
00240
00245 #define ULOC_COUNTRY_CAPACITY 4
00246
00251 #define ULOC_FULLNAME_CAPACITY 50
00252
00268 typedef enum {
00270 ULOC_ACTUAL_LOCALE = 0,
00272 ULOC_VALID_LOCALE = 1,
00274 ULOC_REQUESTED_LOCALE = 2,
00275 ULOC_DATA_LOCALE_TYPE_LIMIT
00276 } ULocDataLocaleType ;
00277
00278
00288 U_CAPI const char* U_EXPORT2
00289 uloc_getDefault(void);
00290
00300 U_CAPI void U_EXPORT2
00301 uloc_setDefault(const char* localeID,
00302 UErrorCode* status);
00303
00316 U_CAPI int32_t U_EXPORT2
00317 uloc_getLanguage(const char* localeID,
00318 char* language,
00319 int32_t languageCapacity,
00320 UErrorCode* err);
00321
00334 U_CAPI int32_t U_EXPORT2
00335 uloc_getCountry(const char* localeID,
00336 char* country,
00337 int32_t countryCapacity,
00338 UErrorCode* err);
00339
00352 U_CAPI int32_t U_EXPORT2
00353 uloc_getVariant(const char* localeID,
00354 char* variant,
00355 int32_t variantCapacity,
00356 UErrorCode* err);
00374 U_CAPI int32_t U_EXPORT2
00375 uloc_getName(const char* localeID,
00376 char* name,
00377 int32_t nameCapacity,
00378 UErrorCode* err);
00379
00387 U_CAPI const char* U_EXPORT2
00388 uloc_getISO3Language(const char* localeID);
00389
00390
00398 U_CAPI const char* U_EXPORT2
00399 uloc_getISO3Country(const char* localeID);
00400
00408 U_CAPI uint32_t U_EXPORT2
00409 uloc_getLCID(const char* localeID);
00410
00427 U_CAPI int32_t U_EXPORT2
00428 uloc_getDisplayLanguage(const char* locale,
00429 const char* inLocale,
00430 UChar* language,
00431 int32_t languageCapacity,
00432 UErrorCode* status);
00433
00450 U_CAPI int32_t U_EXPORT2
00451 uloc_getDisplayCountry(const char* locale,
00452 const char* inLocale,
00453 UChar* country,
00454 int32_t countryCapacity,
00455 UErrorCode* status);
00456
00457
00474 U_CAPI int32_t U_EXPORT2
00475 uloc_getDisplayVariant(const char* locale,
00476 const char* inLocale,
00477 UChar* variant,
00478 int32_t variantCapacity,
00479 UErrorCode* status);
00480
00497 U_CAPI int32_t U_EXPORT2
00498 uloc_getDisplayName(const char* localeID,
00499 const char* inLocaleID,
00500 UChar* result,
00501 int32_t maxResultSize,
00502 UErrorCode* err);
00503
00504
00515 U_CAPI const char* U_EXPORT2
00516 uloc_getAvailable(int32_t n);
00517
00524 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00525
00535 U_CAPI const char* const* U_EXPORT2
00536 uloc_getISOLanguages(void);
00537
00547 U_CAPI const char* const* U_EXPORT2
00548 uloc_getISOCountries(void);
00549
00563 U_CAPI int32_t U_EXPORT2
00564 uloc_getParent(const char* localeID,
00565 char* parent,
00566 int32_t parentCapacity,
00567 UErrorCode* err);
00568
00569
00570
00571
00572 #endif
00573
00574
00575