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
#include "unicode/uenum.h"
00026
00201
#define ULOC_CHINESE "zh"
00202
00203
#define ULOC_ENGLISH "en"
00204
00205 #define ULOC_FRENCH "fr"
00206
00207
#define ULOC_GERMAN "de"
00208
00209
#define ULOC_ITALIAN "it"
00210
00211 #define ULOC_JAPANESE "ja"
00212
00213
#define ULOC_KOREAN "ko"
00214
00215
#define ULOC_SIMPLIFIED_CHINESE "zh_CN"
00216
00217 #define ULOC_TRADITIONAL_CHINESE "zh_TW"
00218
00220 #define ULOC_CANADA "en_CA"
00221
00222
#define ULOC_CANADA_FRENCH "fr_CA"
00223
00224
#define ULOC_CHINA "zh_CN"
00225
00226 #define ULOC_PRC "zh_CN"
00227
00228
#define ULOC_FRANCE "fr_FR"
00229
00230 #define ULOC_GERMANY "de_DE"
00231
00232
#define ULOC_ITALY "it_IT"
00233
00234
#define ULOC_JAPAN "ja_JP"
00235
00236 #define ULOC_KOREA "ko_KR"
00237
00238
#define ULOC_TAIWAN "zh_TW"
00239
00240
#define ULOC_UK "en_GB"
00241
00242 #define ULOC_US "en_US"
00243
00249
#define ULOC_LANG_CAPACITY 12
00250
00256
#define ULOC_COUNTRY_CAPACITY 4
00257
00262
#define ULOC_FULLNAME_CAPACITY 56
00263
00264
00265
#ifndef U_HIDE_DRAFT_API
00266
00272
#define ULOC_SCRIPT_CAPACITY 6
00273
00278
#define ULOC_KEYWORDS_CAPACITY 50
00279
00284
#define ULOC_KEYWORD_AND_VALUES_CAPACITY 100
00285
00291
#define ULOC_KEYWORD_SEPARATOR '@'
00292
00296
#define ULOC_KEYWORD_ASSIGN '='
00297
00301
#define ULOC_KEYWORD_ITEM_SEPARATOR ';'
00302
00303
#endif
00304
00319
typedef enum {
00323 ULOC_ACTUAL_LOCALE = 0,
00327
ULOC_VALID_LOCALE = 1,
00328
00329
#ifndef U_HIDE_DEPRECATED_API
00330
00333
ULOC_REQUESTED_LOCALE = 2,
00334
#endif
00335
00336
ULOC_DATA_LOCALE_TYPE_LIMIT
00337 }
ULocDataLocaleType ;
00338
00339
00351
U_STABLE const char*
U_EXPORT2
00352
uloc_getDefault(
void);
00353
00371
U_STABLE void U_EXPORT2
00372
uloc_setDefault(
const char* localeID,
00373 UErrorCode* status);
00374
00387
U_STABLE int32_t U_EXPORT2
00388
uloc_getLanguage(
const char* localeID,
00389
char* language,
00390 int32_t languageCapacity,
00391 UErrorCode* err);
00392
00405
U_DRAFT int32_t U_EXPORT2
00406
uloc_getScript(
const char* localeID,
00407
char* script,
00408 int32_t scriptCapacity,
00409 UErrorCode* err);
00410
00423
U_DRAFT int32_t U_EXPORT2
00424
uloc_getCountry(
const char* localeID,
00425
char* country,
00426 int32_t countryCapacity,
00427 UErrorCode* err);
00428
00441
U_STABLE int32_t U_EXPORT2
00442
uloc_getVariant(
const char* localeID,
00443
char* variant,
00444 int32_t variantCapacity,
00445 UErrorCode* err);
00446
00447
00464
U_STABLE int32_t U_EXPORT2
00465
uloc_getName(
const char* localeID,
00466
char* name,
00467 int32_t nameCapacity,
00468 UErrorCode* err);
00469
00487
U_DRAFT int32_t U_EXPORT2
00488
uloc_canonicalize(
const char* localeID,
00489
char* name,
00490 int32_t nameCapacity,
00491 UErrorCode* err);
00492
00500
U_STABLE const char*
U_EXPORT2
00501
uloc_getISO3Language(
const char* localeID);
00502
00503
00511
U_STABLE const char*
U_EXPORT2
00512
uloc_getISO3Country(
const char* localeID);
00513
00522
U_STABLE uint32_t U_EXPORT2
00523
uloc_getLCID(
const char* localeID);
00524
00541
U_STABLE int32_t U_EXPORT2
00542
uloc_getDisplayLanguage(
const char* locale,
00543
const char* displayLocale,
00544 UChar* language,
00545 int32_t languageCapacity,
00546 UErrorCode* status);
00547
00564
U_DRAFT int32_t U_EXPORT2
00565
uloc_getDisplayScript(
const char* locale,
00566
const char* displayLocale,
00567 UChar* script,
00568 int32_t scriptCapacity,
00569 UErrorCode* status);
00570
00587
U_STABLE int32_t U_EXPORT2
00588
uloc_getDisplayCountry(
const char* locale,
00589
const char* displayLocale,
00590 UChar* country,
00591 int32_t countryCapacity,
00592 UErrorCode* status);
00593
00594
00611
U_STABLE int32_t U_EXPORT2
00612
uloc_getDisplayVariant(
const char* locale,
00613
const char* displayLocale,
00614 UChar* variant,
00615 int32_t variantCapacity,
00616 UErrorCode* status);
00617
00658
U_DRAFT int32_t U_EXPORT2
00659
uloc_getDisplayKeyword(
const char* keyword,
00660
const char* displayLocale,
00661 UChar* dest,
00662 int32_t destCapacity,
00663 UErrorCode* status);
00684
U_DRAFT int32_t U_EXPORT2
00685
uloc_getDisplayKeywordValue(
const char* locale,
00686
const char* keyword,
00687
const char* displayLocale,
00688 UChar* dest,
00689 int32_t destCapacity,
00690 UErrorCode* status);
00707
U_STABLE int32_t U_EXPORT2
00708
uloc_getDisplayName(
const char* localeID,
00709
const char* inLocaleID,
00710 UChar* result,
00711 int32_t maxResultSize,
00712 UErrorCode* err);
00713
00714
00725
U_STABLE const char*
U_EXPORT2
00726
uloc_getAvailable(int32_t n);
00727
00734
U_STABLE int32_t U_EXPORT2 uloc_countAvailable(
void);
00735
00745
U_STABLE const char*
const*
U_EXPORT2
00746
uloc_getISOLanguages(
void);
00747
00757
U_STABLE const char*
const*
U_EXPORT2
00758
uloc_getISOCountries(
void);
00759
00773
U_STABLE int32_t U_EXPORT2
00774
uloc_getParent(
const char* localeID,
00775
char* parent,
00776 int32_t parentCapacity,
00777 UErrorCode* err);
00778
00779
00780
00781
00801
U_DRAFT int32_t U_EXPORT2
00802
uloc_getBaseName(
const char* localeID,
00803
char* name,
00804 int32_t nameCapacity,
00805 UErrorCode* err);
00806
00816
U_DRAFT UEnumeration*
U_EXPORT2
00817
uloc_openKeywords(
const char* localeID,
00818 UErrorCode* status);
00819
00831
U_DRAFT int32_t U_EXPORT2
00832
uloc_getKeywordValue(
const char* localeID,
00833
const char* keywordName,
00834
char* buffer, int32_t bufferCapacity,
00835 UErrorCode* status);
00836
00837
00838
00839
00840
#endif
00841
00842
00843