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 
00212 U_CAPI const char* U_EXPORT2
00213 uloc_getDefault(void);
00214 
00224 U_CAPI void U_EXPORT2
00225 uloc_setDefault(const char* localeID,
00226         UErrorCode*       status);
00227 
00241 U_CAPI int32_t U_EXPORT2
00242 uloc_getLanguage(const char*    localeID,
00243          char* language,
00244          int32_t languageCapacity,
00245          UErrorCode* err);
00246 
00260 U_CAPI int32_t U_EXPORT2
00261 uloc_getCountry(const char*    localeID,
00262         char* country,
00263         int32_t countryCapacity,
00264         UErrorCode* err);
00265 
00279 U_CAPI int32_t U_EXPORT2
00280 uloc_getVariant(const char*    localeID,
00281         char* variant,
00282         int32_t variantCapacity,
00283         UErrorCode* err);
00297 U_CAPI int32_t U_EXPORT2
00298 uloc_getName(const char*    localeID,
00299          char* name,
00300          int32_t nameCapacity,
00301          UErrorCode* err);
00302 
00310 U_CAPI const char* U_EXPORT2
00311 uloc_getISO3Language(const char* localeID);
00312 
00313 
00322 U_CAPI const char* U_EXPORT2
00323 uloc_getISO3Country(const char* localeID);
00324 
00333 U_CAPI uint32_t U_EXPORT2
00334 uloc_getLCID(const char* localeID);
00335 
00348 U_CAPI int32_t U_EXPORT2
00349 uloc_getDisplayLanguage(const char* locale,
00350             const char* inLocale,
00351             UChar* language,
00352             int32_t languageCapacity,
00353             UErrorCode* status);
00354 
00368 U_CAPI int32_t U_EXPORT2
00369 uloc_getDisplayCountry(const char* locale,
00370             const char* inLocale,
00371             UChar* country,
00372             int32_t countryCapacity,
00373             UErrorCode* status);    /* NULL may be used to specify the default */
00374 
00375 
00389 U_CAPI int32_t U_EXPORT2
00390 uloc_getDisplayVariant(const char* locale,
00391             const char* inLocale,
00392                UChar* variant,
00393              int32_t variantCapacity,
00394             UErrorCode* status);    /* NULL may be used to specify the default */
00395 
00409 U_CAPI int32_t U_EXPORT2
00410 uloc_getDisplayName(const char* localeID,
00411             const char* inLocaleID, /* NULL may be used to specify the default */
00412             UChar* result,
00413             int32_t maxResultSize,
00414             UErrorCode* err);
00415 
00416 
00428 U_CAPI const char* U_EXPORT2
00429 uloc_getAvailable(int32_t n);
00430 
00437 U_CAPI int32_t U_EXPORT2 uloc_countAvailable(void);
00438 
00448 U_CAPI const char* const* U_EXPORT2
00449 uloc_getISOLanguages(void);
00450 
00460 U_CAPI const char* const* U_EXPORT2
00461 uloc_getISOCountries(void);
00462 
00469 #define uloc_getDataDirectory u_getDataDirectory
00470 
00477 #define uloc_setDataDirectory u_setDataDirectory
00478 
00479 /*Internal function */
00480 int32_t U_EXPORT2
00481 uloc_getParent(const char*    localeID,
00482                  char* parent,
00483                  int32_t parentCapacity,
00484                  UErrorCode* err);
00485 
00486 /*eof*/
00487 
00488 
00489 #endif /*_ULOC*/
00490 
00491 
00492 

Generated at Wed Aug 16 16:05:37 2000 for ICU1.6 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999