Main Page   Class Hierarchy   Compound List   File List   Header Files   Sources   Compound Members   File Members  

uloc.h

00001 /*
00002 **********************************************************************
00003 *   Copyright (C) 1997-1999, 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 
00169 /*
00170  *
00171  * Useful constants for language.
00172  */
00173 #define ULOC_ENGLISH "en"
00174 #define ULOC_FRENCH "fr"
00175 #define ULOC_GERMAN "de"
00176 #define ULOC_ITALIAN "it"
00177 #define ULOC_JAPANESE "ja"
00178 #define ULOC_KOREAN "ko"
00179 #define ULOC_CHINESE "zh"
00180 #define ULOC_SIMPLIFIED_CHINESE "zh_CN"
00181 #define ULOC_TRADITIONAL_CHINESE "zh_TW"
00182 
00183 /*
00184  *
00185  * Useful constants for country.
00186  */
00187 #define ULOC_FRANCE "fr_FR"
00188 #define ULOC_GERMANY "de_DE"
00189 #define ULOC_ITALY "it_IT"
00190 #define ULOC_JAPAN "ja_JP"
00191 #define ULOC_KOREA "ko_KR"
00192 #define ULOC_CHINA "zh_CN"
00193 #define ULOC_PRC "zh_CN"
00194 #define ULOC_TAIWAN "zh_TW"
00195 #define ULOC_UK "en_GB"
00196 #define ULOC_US "en_US"
00197 #define ULOC_CANADA "en_CA"
00198 #define ULOC_CANADA_FRENCH "fr_CA"
00199 
00200 
00201 
00202 
00211 U_CAPI const char* U_EXPORT2
00212 uloc_getDefault(void);
00213 
00222 U_CAPI void U_EXPORT2
00223 uloc_setDefault(const char* localeID,
00224         UErrorCode*       status);
00225 
00239 U_CAPI int32_t U_EXPORT2
00240 uloc_getLanguage(const char*    localeID,
00241          char* language,
00242          int32_t languageCapacity,
00243          UErrorCode* err);
00244 
00258 U_CAPI int32_t U_EXPORT2
00259 uloc_getCountry(const char*    localeID,
00260         char* country,
00261         int32_t countryCapacity,
00262         UErrorCode* err);
00263 
00277 U_CAPI int32_t U_EXPORT2
00278 uloc_getVariant(const char*    localeID,
00279         char* variant,
00280         int32_t variantCapacity,
00281         UErrorCode* err);
00295 U_CAPI int32_t U_EXPORT2
00296 uloc_getName(const char*    localeID,
00297          char* name,
00298          int32_t nameCapacity,
00299          UErrorCode* err);
00300 
00308 U_CAPI const char* U_EXPORT2
00309 uloc_getISO3Language(const char* localeID);
00310 
00311 
00320 U_CAPI const char* U_EXPORT2
00321 uloc_getISO3Country(const char* localeID);
00322 
00331 U_CAPI uint32_t U_EXPORT2
00332 uloc_getLCID(const char* localeID);
00333 
00346 U_CAPI int32_t U_EXPORT2
00347 uloc_getDisplayLanguage(const char* locale,
00348             const char* inLocale,
00349             UChar* language,
00350             int32_t languageCapacity,
00351             UErrorCode* status);
00352 
00366 U_CAPI int32_t U_EXPORT2
00367 uloc_getDisplayCountry(const char* locale,
00368             const char* inLocale,
00369             UChar* country,
00370             int32_t countryCapacity,
00371             UErrorCode* status);    /* NULL may be used to specify the default */
00372 
00373 
00387 U_CAPI int32_t U_EXPORT2
00388 uloc_getDisplayVariant(const char* locale,
00389             const char* inLocale,
00390                UChar* variant,
00391              int32_t variantCapacity,
00392             UErrorCode* status);    /* NULL may be used to specify the default */
00393 
00407 U_CAPI int32_t U_EXPORT2
00408 uloc_getDisplayName(const char* localeID,
00409             const char* inLocaleID, /* NULL may be used to specify the default */
00410             UChar* result,
00411             int32_t maxResultSize,
00412             UErrorCode* err);
00413 
00414 
00426 U_CAPI const char* U_EXPORT2
00427 uloc_getAvailable(int32_t n);
00428 
00435 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00436 
00446 U_CAPI const char* const* U_EXPORT2
00447 uloc_getISOLanguages(void);
00448 
00458 U_CAPI const char* const* U_EXPORT2
00459 uloc_getISOCountries(void);
00460 
00467 #define uloc_getDataDirectory u_getDataDirectory
00468 
00475 #define uloc_setDataDirectory u_setDataDirectory
00476 
00477 /*Internal function */
00478 int32_t U_EXPORT2
00479 uloc_getParent(const char*    localeID,
00480                  char* parent,
00481                  int32_t parentCapacity,
00482                  UErrorCode* err);
00483 
00484 /*eof*/
00485 
00486 
00487 #endif /*_ULOC*/
00488 
00489 
00490 

Generated at Mon Jun 5 12:53:06 2000 for ICU1.5 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999