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 
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 
00237 U_CAPI const char* U_EXPORT2
00238 uloc_getDefault(void);
00239 
00249 U_CAPI void U_EXPORT2
00250 uloc_setDefault(const char* localeID,
00251         UErrorCode*       status);
00252 
00265 U_CAPI int32_t U_EXPORT2
00266 uloc_getLanguage(const char*    localeID,
00267          char* language,
00268          int32_t languageCapacity,
00269          UErrorCode* err);
00270 
00283 U_CAPI int32_t U_EXPORT2
00284 uloc_getCountry(const char*    localeID,
00285         char* country,
00286         int32_t countryCapacity,
00287         UErrorCode* err);
00288 
00301 U_CAPI int32_t U_EXPORT2
00302 uloc_getVariant(const char*    localeID,
00303         char* variant,
00304         int32_t variantCapacity,
00305         UErrorCode* err);
00323 U_CAPI int32_t U_EXPORT2
00324 uloc_getName(const char*    localeID,
00325          char* name,
00326          int32_t nameCapacity,
00327          UErrorCode* err);
00328 
00336 U_CAPI const char* U_EXPORT2
00337 uloc_getISO3Language(const char* localeID);
00338 
00339 
00347 U_CAPI const char* U_EXPORT2
00348 uloc_getISO3Country(const char* localeID);
00349 
00357 U_CAPI uint32_t U_EXPORT2
00358 uloc_getLCID(const char* localeID);
00359 
00372 U_CAPI int32_t U_EXPORT2
00373 uloc_getDisplayLanguage(const char* locale,
00374             const char* inLocale,
00375             UChar* language,
00376             int32_t languageCapacity,
00377             UErrorCode* status);
00378 
00391 U_CAPI int32_t U_EXPORT2
00392 uloc_getDisplayCountry(const char* locale,
00393             const char* inLocale,
00394             UChar* country,
00395             int32_t countryCapacity,
00396             UErrorCode* status);    /* NULL may be used to specify the default */
00397 
00398 
00411 U_CAPI int32_t U_EXPORT2
00412 uloc_getDisplayVariant(const char* locale,
00413             const char* inLocale,
00414                UChar* variant,
00415              int32_t variantCapacity,
00416             UErrorCode* status);    /* NULL may be used to specify the default */
00417 
00430 U_CAPI int32_t U_EXPORT2
00431 uloc_getDisplayName(const char* localeID,
00432             const char* inLocaleID, /* NULL may be used to specify the default */
00433             UChar* result,
00434             int32_t maxResultSize,
00435             UErrorCode* err);
00436 
00437 
00448 U_CAPI const char* U_EXPORT2
00449 uloc_getAvailable(int32_t n);
00450 
00457 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00458 
00468 U_CAPI const char* const* U_EXPORT2
00469 uloc_getISOLanguages(void);
00470 
00480 U_CAPI const char* const* U_EXPORT2
00481 uloc_getISOCountries(void);
00482 
00496 U_CAPI int32_t U_EXPORT2
00497 uloc_getParent(const char*    localeID,
00498                  char* parent,
00499                  int32_t parentCapacity,
00500                  UErrorCode* err);
00501 
00502 /*eof*/
00503 
00504 
00505 #endif /*_ULOC*/
00506 
00507 
00508 

Generated on Mon Dec 3 19:00:25 2001 for ICU 2.0 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001