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-2003, 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 
00200 #define ULOC_CHINESE            "zh"
00201 
00202 #define ULOC_ENGLISH            "en"
00203 
00204 #define ULOC_FRENCH             "fr"
00205 
00206 #define ULOC_GERMAN             "de"
00207 
00208 #define ULOC_ITALIAN            "it"
00209 
00210 #define ULOC_JAPANESE           "ja"
00211 
00212 #define ULOC_KOREAN             "ko"
00213 
00214 #define ULOC_SIMPLIFIED_CHINESE "zh_CN"
00215 
00216 #define ULOC_TRADITIONAL_CHINESE "zh_TW"
00217 
00219 #define ULOC_CANADA         "en_CA"
00220 
00221 #define ULOC_CANADA_FRENCH  "fr_CA"
00222 
00223 #define ULOC_CHINA          "zh_CN"
00224 
00225 #define ULOC_PRC            "zh_CN"
00226 
00227 #define ULOC_FRANCE         "fr_FR"
00228 
00229 #define ULOC_GERMANY        "de_DE"
00230 
00231 #define ULOC_ITALY          "it_IT"
00232 
00233 #define ULOC_JAPAN          "ja_JP"
00234 
00235 #define ULOC_KOREA          "ko_KR"
00236 
00237 #define ULOC_TAIWAN         "zh_TW"
00238 
00239 #define ULOC_UK             "en_GB"
00240 
00241 #define ULOC_US             "en_US"
00242 
00248 #define ULOC_LANG_CAPACITY 12
00249 
00254 #define ULOC_COUNTRY_CAPACITY 4
00255 
00260 #define ULOC_FULLNAME_CAPACITY 50
00261 
00262 
00277 typedef enum {
00279   ULOC_ACTUAL_LOCALE    = 0,
00281   ULOC_VALID_LOCALE    = 1,
00283   ULOC_REQUESTED_LOCALE = 2,
00284   ULOC_DATA_LOCALE_TYPE_LIMIT
00285 } ULocDataLocaleType ;
00286 
00287 
00297 U_CAPI const char* U_EXPORT2
00298 uloc_getDefault(void);
00299 
00309 U_CAPI void U_EXPORT2
00310 uloc_setDefault(const char* localeID,
00311         UErrorCode*       status);
00312 
00325 U_CAPI int32_t U_EXPORT2
00326 uloc_getLanguage(const char*    localeID,
00327          char* language,
00328          int32_t languageCapacity,
00329          UErrorCode* err);
00330 
00343 U_CAPI int32_t U_EXPORT2
00344 uloc_getCountry(const char*    localeID,
00345         char* country,
00346         int32_t countryCapacity,
00347         UErrorCode* err);
00348 
00361 U_CAPI int32_t U_EXPORT2
00362 uloc_getVariant(const char*    localeID,
00363         char* variant,
00364         int32_t variantCapacity,
00365         UErrorCode* err);
00383 U_CAPI int32_t U_EXPORT2
00384 uloc_getName(const char*    localeID,
00385          char* name,
00386          int32_t nameCapacity,
00387          UErrorCode* err);
00388 
00396 U_CAPI const char* U_EXPORT2
00397 uloc_getISO3Language(const char* localeID);
00398 
00399 
00407 U_CAPI const char* U_EXPORT2
00408 uloc_getISO3Country(const char* localeID);
00409 
00417 U_CAPI uint32_t U_EXPORT2
00418 uloc_getLCID(const char* localeID);
00419 
00436 U_CAPI int32_t U_EXPORT2
00437 uloc_getDisplayLanguage(const char* locale,
00438             const char* inLocale,
00439             UChar* language,
00440             int32_t languageCapacity,
00441             UErrorCode* status);
00442 
00459 U_CAPI int32_t U_EXPORT2
00460 uloc_getDisplayCountry(const char* locale,
00461             const char* inLocale,
00462             UChar* country,
00463             int32_t countryCapacity,
00464             UErrorCode* status);    /* NULL may be used to specify the default */
00465 
00466 
00483 U_CAPI int32_t U_EXPORT2
00484 uloc_getDisplayVariant(const char* locale,
00485             const char* inLocale,
00486                UChar* variant,
00487              int32_t variantCapacity,
00488             UErrorCode* status);    /* NULL may be used to specify the default */
00489 
00506 U_CAPI int32_t U_EXPORT2
00507 uloc_getDisplayName(const char* localeID,
00508             const char* inLocaleID, /* NULL may be used to specify the default */
00509             UChar* result,
00510             int32_t maxResultSize,
00511             UErrorCode* err);
00512 
00513 
00524 U_CAPI const char* U_EXPORT2
00525 uloc_getAvailable(int32_t n);
00526 
00533 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00534 
00544 U_CAPI const char* const* U_EXPORT2
00545 uloc_getISOLanguages(void);
00546 
00556 U_CAPI const char* const* U_EXPORT2
00557 uloc_getISOCountries(void);
00558 
00572 U_CAPI int32_t U_EXPORT2
00573 uloc_getParent(const char*    localeID,
00574                  char* parent,
00575                  int32_t parentCapacity,
00576                  UErrorCode* err);
00577 
00578 /*eof*/
00579 
00580 
00581 #endif /*_ULOC*/
00582 
00583 
00584 

Generated on Wed Sep 3 17:47:09 2003 for ICU 2.6 by doxygen 1.3.2