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-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 #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 
00255 #define ULOC_SCRIPT_CAPACITY 6
00256 
00261 #define ULOC_COUNTRY_CAPACITY 4
00262 
00267 #define ULOC_FULLNAME_CAPACITY 56
00268 
00272 #define ULOC_KEYWORDS_CAPACITY 50
00273 
00277 #define ULOC_KEYWORD_AND_VALUES_CAPACITY 100
00278 
00293 typedef enum {
00295   ULOC_ACTUAL_LOCALE    = 0,
00297   ULOC_VALID_LOCALE    = 1,
00299   ULOC_REQUESTED_LOCALE = 2,
00300   ULOC_DATA_LOCALE_TYPE_LIMIT
00301 } ULocDataLocaleType ;
00302 
00303 
00315 U_CAPI const char* U_EXPORT2
00316 uloc_getDefault(void);
00317 
00335 U_CAPI void U_EXPORT2
00336 uloc_setDefault(const char* localeID,
00337         UErrorCode*       status);
00338 
00351 U_CAPI int32_t U_EXPORT2
00352 uloc_getLanguage(const char*    localeID,
00353          char* language,
00354          int32_t languageCapacity,
00355          UErrorCode* err);
00356 
00369 U_CAPI int32_t U_EXPORT2
00370 uloc_getScript(const char*    localeID,
00371          char* script,
00372          int32_t scriptCapacity,
00373          UErrorCode* err);
00374 
00387 U_CAPI int32_t U_EXPORT2
00388 uloc_getCountry(const char*    localeID,
00389         char* country,
00390         int32_t countryCapacity,
00391         UErrorCode* err);
00392 
00405 U_CAPI int32_t U_EXPORT2
00406 uloc_getVariant(const char*    localeID,
00407         char* variant,
00408         int32_t variantCapacity,
00409         UErrorCode* err);
00410 
00411 
00428 U_CAPI int32_t U_EXPORT2
00429 uloc_getName(const char*    localeID,
00430          char* name,
00431          int32_t nameCapacity,
00432          UErrorCode* err);
00433 
00451 U_CAPI int32_t U_EXPORT2
00452 uloc_canonicalize(const char*    localeID,
00453          char* name,
00454          int32_t nameCapacity,
00455          UErrorCode* err);
00456 
00464 U_CAPI const char* U_EXPORT2
00465 uloc_getISO3Language(const char* localeID);
00466 
00467 
00475 U_CAPI const char* U_EXPORT2
00476 uloc_getISO3Country(const char* localeID);
00477 
00485 U_CAPI uint32_t U_EXPORT2
00486 uloc_getLCID(const char* localeID);
00487 
00504 U_CAPI int32_t U_EXPORT2
00505 uloc_getDisplayLanguage(const char* locale,
00506             const char* displayLocale,
00507             UChar* language,
00508             int32_t languageCapacity,
00509             UErrorCode* status);
00510 
00527 U_CAPI int32_t U_EXPORT2
00528 uloc_getDisplayScript(const char* locale,
00529             const char* displayLocale,
00530             UChar* script,
00531             int32_t scriptCapacity,
00532             UErrorCode* status);
00533 
00550 U_CAPI int32_t U_EXPORT2
00551 uloc_getDisplayCountry(const char* locale,
00552                        const char* displayLocale,
00553                        UChar* country,
00554                        int32_t countryCapacity,
00555                        UErrorCode* status);
00556 
00557 
00574 U_CAPI int32_t U_EXPORT2
00575 uloc_getDisplayVariant(const char* locale,
00576                        const char* displayLocale,
00577                        UChar* variant,
00578                        int32_t variantCapacity,
00579                        UErrorCode* status);
00580 
00621 U_CAPI int32_t U_EXPORT2
00622 uloc_getDisplayKeyword(const char* keyword,
00623                        const char* displayLocale,
00624                        UChar* dest,
00625                        int32_t destCapacity,
00626                        UErrorCode* status);
00647 U_CAPI int32_t U_EXPORT2
00648 uloc_getDisplayKeywordValue(   const char* locale,
00649                                const char* keyword,
00650                                const char* displayLocale,
00651                                UChar* dest,
00652                                int32_t destCapacity,
00653                                UErrorCode* status);
00670 U_CAPI int32_t U_EXPORT2
00671 uloc_getDisplayName(const char* localeID,
00672             const char* inLocaleID,
00673             UChar* result,
00674             int32_t maxResultSize,
00675             UErrorCode* err);
00676 
00677 
00688 U_CAPI const char* U_EXPORT2
00689 uloc_getAvailable(int32_t n);
00690 
00697 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00698 
00708 U_CAPI const char* const* U_EXPORT2
00709 uloc_getISOLanguages(void);
00710 
00720 U_CAPI const char* const* U_EXPORT2
00721 uloc_getISOCountries(void);
00722 
00736 U_CAPI int32_t U_EXPORT2
00737 uloc_getParent(const char*    localeID,
00738                  char* parent,
00739                  int32_t parentCapacity,
00740                  UErrorCode* err);
00741 
00742 
00748 #define ULOC_KEYWORD_SEPARATOR '@'
00749 
00753 #define ULOC_KEYWORD_ASSIGN '='
00754 
00758 #define ULOC_KEYWORD_ITEM_SEPARATOR ';'
00759 
00779 U_CAPI int32_t U_EXPORT2
00780 uloc_getBaseName(const char*    localeID,
00781          char* name,
00782          int32_t nameCapacity,
00783          UErrorCode* err);
00784 
00794 U_CAPI UEnumeration* U_EXPORT2
00795 uloc_openKeywords(const char* localeID,
00796                         UErrorCode* status);
00797 
00809 U_CAPI int32_t U_EXPORT2
00810 uloc_getKeywordValue(const char* localeID,
00811                      const char* keywordName,
00812                      char* buffer, int32_t bufferCapacity,
00813                      UErrorCode* status);
00814 
00815 /*eof*/
00816 
00817 
00818 #endif /*_ULOC*/
00819 
00820 
00821 

Generated on Mon Nov 24 14:35:41 2003 for ICU 2.8 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001