Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

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 
00198 #define ULOC_CHINESE            "zh"
00199 
00200 #define ULOC_ENGLISH            "en"
00201 
00202 #define ULOC_FRENCH             "fr"
00203 
00204 #define ULOC_GERMAN             "de"
00205 
00206 #define ULOC_ITALIAN            "it"
00207 
00208 #define ULOC_JAPANESE           "ja"
00209 
00210 #define ULOC_KOREAN             "ko"
00211 
00212 #define ULOC_SIMPLIFIED_CHINESE "zh_CN"
00213 
00214 #define ULOC_TRADITIONAL_CHINESE "zh_TW"
00215 
00217 #define ULOC_CANADA         "en_CA"
00218 
00219 #define ULOC_CANADA_FRENCH  "fr_CA"
00220 
00221 #define ULOC_CHINA          "zh_CN"
00222 
00223 #define ULOC_PRC            "zh_CN"
00224 
00225 #define ULOC_FRANCE         "fr_FR"
00226 
00227 #define ULOC_GERMANY        "de_DE"
00228 
00229 #define ULOC_ITALY          "it_IT"
00230 
00231 #define ULOC_JAPAN          "ja_JP"
00232 
00233 #define ULOC_KOREA          "ko_KR"
00234 
00235 #define ULOC_TAIWAN         "zh_TW"
00236 
00237 #define ULOC_UK             "en_GB"
00238 
00239 #define ULOC_US             "en_US"
00240 
00246 #define ULOC_LANG_CAPACITY 12
00247 
00252 #define ULOC_COUNTRY_CAPACITY 4
00253 
00258 #define ULOC_FULLNAME_CAPACITY 50
00259 
00260 
00275 typedef enum {
00277   ULOC_ACTUAL_LOCALE    = 0,
00279   ULOC_VALID_LOCALE    = 1,
00281   ULOC_REQUESTED_LOCALE = 2,
00282   ULOC_DATA_LOCALE_TYPE_LIMIT
00283 } ULocDataLocaleType ;
00284 
00285 
00295 U_CAPI const char* U_EXPORT2
00296 uloc_getDefault(void);
00297 
00307 U_CAPI void U_EXPORT2
00308 uloc_setDefault(const char* localeID,
00309         UErrorCode*       status);
00310 
00323 U_CAPI int32_t U_EXPORT2
00324 uloc_getLanguage(const char*    localeID,
00325          char* language,
00326          int32_t languageCapacity,
00327          UErrorCode* err);
00328 
00341 U_CAPI int32_t U_EXPORT2
00342 uloc_getCountry(const char*    localeID,
00343         char* country,
00344         int32_t countryCapacity,
00345         UErrorCode* err);
00346 
00359 U_CAPI int32_t U_EXPORT2
00360 uloc_getVariant(const char*    localeID,
00361         char* variant,
00362         int32_t variantCapacity,
00363         UErrorCode* err);
00381 U_CAPI int32_t U_EXPORT2
00382 uloc_getName(const char*    localeID,
00383          char* name,
00384          int32_t nameCapacity,
00385          UErrorCode* err);
00386 
00394 U_CAPI const char* U_EXPORT2
00395 uloc_getISO3Language(const char* localeID);
00396 
00397 
00405 U_CAPI const char* U_EXPORT2
00406 uloc_getISO3Country(const char* localeID);
00407 
00415 U_CAPI uint32_t U_EXPORT2
00416 uloc_getLCID(const char* localeID);
00417 
00434 U_CAPI int32_t U_EXPORT2
00435 uloc_getDisplayLanguage(const char* locale,
00436             const char* inLocale,
00437             UChar* language,
00438             int32_t languageCapacity,
00439             UErrorCode* status);
00440 
00457 U_CAPI int32_t U_EXPORT2
00458 uloc_getDisplayCountry(const char* locale,
00459             const char* inLocale,
00460             UChar* country,
00461             int32_t countryCapacity,
00462             UErrorCode* status);    /* NULL may be used to specify the default */
00463 
00464 
00481 U_CAPI int32_t U_EXPORT2
00482 uloc_getDisplayVariant(const char* locale,
00483             const char* inLocale,
00484                UChar* variant,
00485              int32_t variantCapacity,
00486             UErrorCode* status);    /* NULL may be used to specify the default */
00487 
00504 U_CAPI int32_t U_EXPORT2
00505 uloc_getDisplayName(const char* localeID,
00506             const char* inLocaleID, /* NULL may be used to specify the default */
00507             UChar* result,
00508             int32_t maxResultSize,
00509             UErrorCode* err);
00510 
00511 
00522 U_CAPI const char* U_EXPORT2
00523 uloc_getAvailable(int32_t n);
00524 
00531 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00532 
00542 U_CAPI const char* const* U_EXPORT2
00543 uloc_getISOLanguages(void);
00544 
00554 U_CAPI const char* const* U_EXPORT2
00555 uloc_getISOCountries(void);
00556 
00570 U_CAPI int32_t U_EXPORT2
00571 uloc_getParent(const char*    localeID,
00572                  char* parent,
00573                  int32_t parentCapacity,
00574                  UErrorCode* err);
00575 
00576 /*eof*/
00577 
00578 
00579 #endif /*_ULOC*/
00580 
00581 
00582 

Generated on Wed Dec 18 16:49:55 2002 for ICU 2.4 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001