Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

uloc.h

Go to the documentation of this file.
00001 /* 00002 ********************************************************************** 00003 * Copyright (C) 1997-2001, International Business Machines 00004 * Corporation and others. All Rights Reserved. 00005 ********************************************************************** 00006 * 00007 * File ULOC.H 00008 * 00009 * Modification History: 00010 * 00011 * Date Name Description 00012 * 04/01/97 aliu Creation. 00013 * 08/22/98 stephen JDK 1.2 sync. 00014 * 12/08/98 rtg New C API for Locale 00015 * 03/30/99 damiba overhaul 00016 * 03/31/99 helena Javadoc for uloc functions. 00017 * 04/15/99 Madhu Updated Javadoc 00018 ******************************************************************************** 00019 */ 00020 00021 #ifndef ULOC_H 00022 #define ULOC_H 00023 00024 #include "unicode/utypes.h" 00025 00197 /* 00198 * Useful constants for language. 00199 * @stable 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 * Useful constants for country/region. 00213 * @stable 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); /* NULL may be used to specify the default */ 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); /* NULL may be used to specify the default */ 00451 00464 U_CAPI int32_t U_EXPORT2 00465 uloc_getDisplayName(const char* localeID, 00466 const char* inLocaleID, /* NULL may be used to specify the default */ 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 /*eof*/ 00537 00538 00539 #endif /*_ULOC*/ 00540 00541 00542

Generated on Fri Aug 13 09:53:50 2004 for ICU 2.1 by doxygen 1.3.7