Go to the documentation of this file.
49 class StringEnumeration;
191 static const Locale &U_EXPORT2 getRoot(
void);
193 static const Locale &U_EXPORT2 getEnglish(
void);
195 static const Locale &U_EXPORT2 getFrench(
void);
197 static const Locale &U_EXPORT2 getGerman(
void);
199 static const Locale &U_EXPORT2 getItalian(
void);
201 static const Locale &U_EXPORT2 getJapanese(
void);
203 static const Locale &U_EXPORT2 getKorean(
void);
205 static const Locale &U_EXPORT2 getChinese(
void);
207 static const Locale &U_EXPORT2 getSimplifiedChinese(
void);
209 static const Locale &U_EXPORT2 getTraditionalChinese(
void);
212 static const Locale &U_EXPORT2 getFrance(
void);
214 static const Locale &U_EXPORT2 getGermany(
void);
216 static const Locale &U_EXPORT2 getItaly(
void);
218 static const Locale &U_EXPORT2 getJapan(
void);
220 static const Locale &U_EXPORT2 getKorea(
void);
222 static const Locale &U_EXPORT2 getChina(
void);
224 static const Locale &U_EXPORT2 getPRC(
void);
226 static const Locale &U_EXPORT2 getTaiwan(
void);
228 static const Locale &U_EXPORT2 getUK(
void);
230 static const Locale &U_EXPORT2 getUS(
void);
232 static const Locale &U_EXPORT2 getCanada(
void);
234 static const Locale &U_EXPORT2 getCanadaFrench(
void);
270 Locale(
const char * language,
271 const char * country = 0,
272 const char * variant = 0,
273 const char * keywordsAndValues = 0);
331 #ifndef U_HIDE_SYSTEM_API
347 static const Locale& U_EXPORT2 getDefault(
void);
361 static void U_EXPORT2 setDefault(
const Locale& newLocale,
374 static Locale U_EXPORT2 createFromName(
const char *name);
384 static Locale U_EXPORT2 createCanonical(
const char* name);
391 inline const char * getLanguage( )
const;
400 inline const char * getScript( )
const;
407 inline const char * getCountry( )
const;
414 inline const char * getVariant( )
const;
424 inline const char * getName()
const;
433 const char * getBaseName()
const;
457 int32_t getKeywordValue(
const char* keywordName,
char *buffer, int32_t bufferCapacity,
UErrorCode &status)
const;
473 void setKeywordValue(
const char* keywordName,
const char* keywordValue,
UErrorCode &status);
481 const char * getISO3Language()
const;
488 const char * getISO3Country()
const;
497 uint32_t getLCID(
void)
const;
512 UBool isRightToLeft()
const;
649 int32_t hashCode(
void)
const;
666 UBool isBogus(
void)
const;
676 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
686 static const char*
const* U_EXPORT2 getISOCountries();
696 static const char*
const* U_EXPORT2 getISOLanguages();
703 static UClassID U_EXPORT2 getStaticClassID();
713 #ifndef U_HIDE_INTERNAL_API
718 void setFromPOSIXID(
const char *posixID);
729 Locale& init(
const char* cLocaleID,
UBool canonicalize);
744 static Locale *getLocaleCache(
void);
749 int32_t variantBegin;
758 static const Locale &getLocale(
int locid);
764 friend Locale *locale_set_default_internal(
const char *,
UErrorCode& status);
779 Locale::getCountry()
const
785 Locale::getLanguage()
const
791 Locale::getScript()
const
797 Locale::getVariant()
const
799 return &baseName[variantBegin];
803 Locale::getName()
const
809 Locale::isBogus(
void)
const {
Basic definitions for ICU, for both C and C++ APIs.
int8_t UBool
The ICU boolean type.
#define ULOC_SCRIPT_CAPACITY
Useful constant for the maximum size of the script part of a locale ID (including the terminating NUL...
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
UObject is the common ICU "boilerplate" class.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
C API: Platform Utilities.
Base class for 'pure' C++ implementations of uenum api.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
#define ULOC_FULLNAME_CAPACITY
Useful constant for the maximum size of the whole locale ID (including the terminating NULL and all k...
void locale_available_init()
#define ULOC_LANG_CAPACITY
Useful constant for the maximum size of the language part of a locale ID.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_BEGIN
A Locale object represents a specific geographical, political, or cultural region.
#define ULOC_COUNTRY_CAPACITY
Useful constant for the maximum size of the country part of a locale ID (including the terminating NU...