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
00197
00198
00199
00200
00201 #define ULOC_CHINESE "zh"
00202 #define ULOC_ENGLISH "en"
00203 #define ULOC_FRENCH "fr"
00204 #define ULOC_GERMAN "de"
00205 #define ULOC_ITALIAN "it"
00206 #define ULOC_JAPANESE "ja"
00207 #define ULOC_KOREAN "ko"
00208 #define ULOC_SIMPLIFIED_CHINESE "zh_CN"
00209 #define ULOC_TRADITIONAL_CHINESE "zh_TW"
00210
00211
00212
00213
00214
00215 #define ULOC_CANADA "en_CA"
00216 #define ULOC_CANADA_FRENCH "fr_CA"
00217 #define ULOC_CHINA "zh_CN"
00218 #define ULOC_PRC "zh_CN"
00219 #define ULOC_FRANCE "fr_FR"
00220 #define ULOC_GERMANY "de_DE"
00221 #define ULOC_ITALY "it_IT"
00222 #define ULOC_JAPAN "ja_JP"
00223 #define ULOC_KOREA "ko_KR"
00224 #define ULOC_TAIWAN "zh_TW"
00225 #define ULOC_UK "en_GB"
00226 #define ULOC_US "en_US"
00227
00232 #define ULOC_LANG_CAPACITY 12
00233 #define ULOC_COUNTRY_CAPACITY 4
00234 #define ULOC_FULLNAME_CAPACITY 50
00235
00236
00251 typedef enum {
00253 ULOC_ACTUAL_LOCALE = 0,
00255 ULOC_VALID_LOCALE = 1,
00257 ULOC_REQUESTED_LOCALE = 2,
00258 ULOC_DATA_LOCALE_TYPE_LIMIT
00259 } ULocDataLocaleType ;
00260
00261
00271 U_CAPI const char* U_EXPORT2
00272 uloc_getDefault(void);
00273
00283 U_CAPI void U_EXPORT2
00284 uloc_setDefault(const char* localeID,
00285 UErrorCode* status);
00286
00299 U_CAPI int32_t U_EXPORT2
00300 uloc_getLanguage(const char* localeID,
00301 char* language,
00302 int32_t languageCapacity,
00303 UErrorCode* err);
00304
00317 U_CAPI int32_t U_EXPORT2
00318 uloc_getCountry(const char* localeID,
00319 char* country,
00320 int32_t countryCapacity,
00321 UErrorCode* err);
00322
00335 U_CAPI int32_t U_EXPORT2
00336 uloc_getVariant(const char* localeID,
00337 char* variant,
00338 int32_t variantCapacity,
00339 UErrorCode* err);
00357 U_CAPI int32_t U_EXPORT2
00358 uloc_getName(const char* localeID,
00359 char* name,
00360 int32_t nameCapacity,
00361 UErrorCode* err);
00362
00370 U_CAPI const char* U_EXPORT2
00371 uloc_getISO3Language(const char* localeID);
00372
00373
00381 U_CAPI const char* U_EXPORT2
00382 uloc_getISO3Country(const char* localeID);
00383
00391 U_CAPI uint32_t U_EXPORT2
00392 uloc_getLCID(const char* localeID);
00393
00406 U_CAPI int32_t U_EXPORT2
00407 uloc_getDisplayLanguage(const char* locale,
00408 const char* inLocale,
00409 UChar* language,
00410 int32_t languageCapacity,
00411 UErrorCode* status);
00412
00425 U_CAPI int32_t U_EXPORT2
00426 uloc_getDisplayCountry(const char* locale,
00427 const char* inLocale,
00428 UChar* country,
00429 int32_t countryCapacity,
00430 UErrorCode* status);
00431
00432
00445 U_CAPI int32_t U_EXPORT2
00446 uloc_getDisplayVariant(const char* locale,
00447 const char* inLocale,
00448 UChar* variant,
00449 int32_t variantCapacity,
00450 UErrorCode* status);
00451
00464 U_CAPI int32_t U_EXPORT2
00465 uloc_getDisplayName(const char* localeID,
00466 const char* inLocaleID,
00467 UChar* result,
00468 int32_t maxResultSize,
00469 UErrorCode* err);
00470
00471
00482 U_CAPI const char* U_EXPORT2
00483 uloc_getAvailable(int32_t n);
00484
00491 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00492
00502 U_CAPI const char* const* U_EXPORT2
00503 uloc_getISOLanguages(void);
00504
00514 U_CAPI const char* const* U_EXPORT2
00515 uloc_getISOCountries(void);
00516
00530 U_CAPI int32_t U_EXPORT2
00531 uloc_getParent(const char* localeID,
00532 char* parent,
00533 int32_t parentCapacity,
00534 UErrorCode* err);
00535
00536
00537
00538
00539 #endif
00540
00541
00542