188 static const Locale &U_EXPORT2 getRoot(
void);
190 static const Locale &U_EXPORT2 getEnglish(
void);
192 static const Locale &U_EXPORT2 getFrench(
void);
194 static const Locale &U_EXPORT2 getGerman(
void);
196 static const Locale &U_EXPORT2 getItalian(
void);
198 static const Locale &U_EXPORT2 getJapanese(
void);
200 static const Locale &U_EXPORT2 getKorean(
void);
202 static const Locale &U_EXPORT2 getChinese(
void);
204 static const Locale &U_EXPORT2 getSimplifiedChinese(
void);
206 static const Locale &U_EXPORT2 getTraditionalChinese(
void);
209 static const Locale &U_EXPORT2 getFrance(
void);
211 static const Locale &U_EXPORT2 getGermany(
void);
213 static const Locale &U_EXPORT2 getItaly(
void);
215 static const Locale &U_EXPORT2 getJapan(
void);
217 static const Locale &U_EXPORT2 getKorea(
void);
219 static const Locale &U_EXPORT2 getChina(
void);
221 static const Locale &U_EXPORT2 getPRC(
void);
223 static const Locale &U_EXPORT2 getTaiwan(
void);
225 static const Locale &U_EXPORT2 getUK(
void);
227 static const Locale &U_EXPORT2 getUS(
void);
229 static const Locale &U_EXPORT2 getCanada(
void);
231 static const Locale &U_EXPORT2 getCanadaFrench(
void);
267 Locale(
const char * language,
268 const char * country = 0,
269 const char * variant = 0,
270 const char * keywordsAndValues = 0);
328 #ifndef U_HIDE_SYSTEM_API
344 static const Locale& U_EXPORT2 getDefault(
void);
358 static void U_EXPORT2 setDefault(
const Locale& newLocale,
371 static Locale U_EXPORT2 createFromName(
const char *name);
381 static Locale U_EXPORT2 createCanonical(
const char* name);
388 inline const char * getLanguage( )
const;
397 inline const char * getScript( )
const;
404 inline const char * getCountry( )
const;
411 inline const char * getVariant( )
const;
421 inline const char * getName()
const;
430 const char * getBaseName()
const;
454 int32_t getKeywordValue(
const char* keywordName,
char *buffer, int32_t bufferCapacity,
UErrorCode &status)
const;
470 void setKeywordValue(
const char* keywordName,
const char* keywordValue,
UErrorCode &status);
478 const char * getISO3Language()
const;
485 const char * getISO3Country()
const;
494 uint32_t getLCID(
void)
const;
496 #ifndef U_HIDE_DRAFT_API
510 UBool isRightToLeft()
const;
648 int32_t hashCode(
void)
const;
665 UBool isBogus(
void)
const;
675 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
685 static const char*
const* U_EXPORT2 getISOCountries();
695 static const char*
const* U_EXPORT2 getISOLanguages();
702 static UClassID U_EXPORT2 getStaticClassID();
712 #ifndef U_HIDE_INTERNAL_API
717 void setFromPOSIXID(
const char *posixID);
728 Locale& init(
const char* cLocaleID,
UBool canonicalize);
743 static Locale *getLocaleCache(
void);
748 int32_t variantBegin;
757 static const Locale &getLocale(
int locid);
763 friend Locale *locale_set_default_internal(
const char *,
UErrorCode& status);
778 Locale::getCountry()
const
784 Locale::getLanguage()
const
790 Locale::getScript()
const
796 Locale::getVariant()
const
798 return &baseName[variantBegin];
802 Locale::getName()
const
808 Locale::isBogus(
void)
const {
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
#define ULOC_LANG_CAPACITY
Useful constant for the maximum size of the language part of a locale ID.
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...
void locale_available_init()
#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.