185 static const Locale &U_EXPORT2 getRoot(
void);
187 static const Locale &U_EXPORT2 getEnglish(
void);
189 static const Locale &U_EXPORT2 getFrench(
void);
191 static const Locale &U_EXPORT2 getGerman(
void);
193 static const Locale &U_EXPORT2 getItalian(
void);
195 static const Locale &U_EXPORT2 getJapanese(
void);
197 static const Locale &U_EXPORT2 getKorean(
void);
199 static const Locale &U_EXPORT2 getChinese(
void);
201 static const Locale &U_EXPORT2 getSimplifiedChinese(
void);
203 static const Locale &U_EXPORT2 getTraditionalChinese(
void);
206 static const Locale &U_EXPORT2 getFrance(
void);
208 static const Locale &U_EXPORT2 getGermany(
void);
210 static const Locale &U_EXPORT2 getItaly(
void);
212 static const Locale &U_EXPORT2 getJapan(
void);
214 static const Locale &U_EXPORT2 getKorea(
void);
216 static const Locale &U_EXPORT2 getChina(
void);
218 static const Locale &U_EXPORT2 getPRC(
void);
220 static const Locale &U_EXPORT2 getTaiwan(
void);
222 static const Locale &U_EXPORT2 getUK(
void);
224 static const Locale &U_EXPORT2 getUS(
void);
226 static const Locale &U_EXPORT2 getCanada(
void);
228 static const Locale &U_EXPORT2 getCanadaFrench(
void);
264 Locale(
const char * language,
265 const char * country = 0,
266 const char * variant = 0,
267 const char * keywordsAndValues = 0);
325 #ifndef U_HIDE_SYSTEM_API
341 static const Locale& U_EXPORT2 getDefault(
void);
355 static void U_EXPORT2 setDefault(
const Locale& newLocale,
368 static Locale U_EXPORT2 createFromName(
const char *name);
378 static Locale U_EXPORT2 createCanonical(
const char* name);
385 inline const char * getLanguage( )
const;
394 inline const char * getScript( )
const;
401 inline const char * getCountry( )
const;
408 inline const char * getVariant( )
const;
418 inline const char * getName()
const;
427 const char * getBaseName()
const;
451 int32_t getKeywordValue(
const char* keywordName,
char *buffer, int32_t bufferCapacity,
UErrorCode &status)
const;
453 #ifndef U_HIDE_DRAFT_API
465 void setKeywordValue(
const char* keywordName,
const char* keywordValue,
UErrorCode &status);
474 const char * getISO3Language()
const;
481 const char * getISO3Country()
const;
490 uint32_t getLCID(
void)
const;
627 int32_t hashCode(
void)
const;
644 UBool isBogus(
void)
const;
654 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
664 static const char*
const* U_EXPORT2 getISOCountries();
674 static const char*
const* U_EXPORT2 getISOLanguages();
681 static UClassID U_EXPORT2 getStaticClassID();
691 #ifndef U_HIDE_INTERNAL_API
696 void setFromPOSIXID(
const char *posixID);
707 Locale& init(
const char* cLocaleID,
UBool canonicalize);
722 static Locale *getLocaleCache(
void);
727 int32_t variantBegin;
736 static const Locale &getLocale(
int locid);
742 friend Locale *locale_set_default_internal(
const char *,
UErrorCode& status);
752 Locale::getCountry()
const
758 Locale::getLanguage()
const
764 Locale::getScript()
const
770 Locale::getVariant()
const
773 return &baseName[variantBegin];
777 Locale::getName()
const
783 Locale::isBogus(
void)
const {
#define ULOC_LANG_CAPACITY
Useful constant for the maximum size of the language part of a locale ID.
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
#define ULOC_COUNTRY_CAPACITY
Useful constant for the maximum size of the country part of a locale ID (including the terminating NU...
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
#define ULOC_FULLNAME_CAPACITY
Useful constant for the maximum size of the whole locale ID (including the terminating NULL and all k...
Base class for 'pure' C++ implementations of uenum api.
#define ULOC_SCRIPT_CAPACITY
Useful constant for the maximum size of the script part of a locale ID (including the terminating NUL...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
C API: Platform Utilities.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
C++ API: String Enumeration.
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UObject is the common ICU "boilerplate" class.
int8_t UBool
The ICU boolean type.
A Locale object represents a specific geographical, political, or cultural region.