190 static const Locale &U_EXPORT2 getRoot(
void);
192 static const Locale &U_EXPORT2 getEnglish(
void);
194 static const Locale &U_EXPORT2 getFrench(
void);
196 static const Locale &U_EXPORT2 getGerman(
void);
198 static const Locale &U_EXPORT2 getItalian(
void);
200 static const Locale &U_EXPORT2 getJapanese(
void);
202 static const Locale &U_EXPORT2 getKorean(
void);
204 static const Locale &U_EXPORT2 getChinese(
void);
206 static const Locale &U_EXPORT2 getSimplifiedChinese(
void);
208 static const Locale &U_EXPORT2 getTraditionalChinese(
void);
211 static const Locale &U_EXPORT2 getFrance(
void);
213 static const Locale &U_EXPORT2 getGermany(
void);
215 static const Locale &U_EXPORT2 getItaly(
void);
217 static const Locale &U_EXPORT2 getJapan(
void);
219 static const Locale &U_EXPORT2 getKorea(
void);
221 static const Locale &U_EXPORT2 getChina(
void);
223 static const Locale &U_EXPORT2 getPRC(
void);
225 static const Locale &U_EXPORT2 getTaiwan(
void);
227 static const Locale &U_EXPORT2 getUK(
void);
229 static const Locale &U_EXPORT2 getUS(
void);
231 static const Locale &U_EXPORT2 getCanada(
void);
233 static const Locale &U_EXPORT2 getCanadaFrench(
void);
269 Locale(
const char * language,
270 const char * country = 0,
271 const char * variant = 0,
272 const char * keywordsAndValues = 0);
330 #ifndef U_HIDE_SYSTEM_API 346 static const Locale& U_EXPORT2 getDefault(
void);
360 static void U_EXPORT2 setDefault(
const Locale& newLocale,
373 static Locale U_EXPORT2 createFromName(
const char *name);
383 static Locale U_EXPORT2 createCanonical(
const char* name);
390 inline const char * getLanguage( )
const;
399 inline const char * getScript( )
const;
406 inline const char * getCountry( )
const;
413 inline const char * getVariant( )
const;
423 inline const char * getName()
const;
432 const char * getBaseName()
const;
456 int32_t getKeywordValue(
const char* keywordName,
char *buffer, int32_t bufferCapacity,
UErrorCode &status)
const;
472 void setKeywordValue(
const char* keywordName,
const char* keywordValue,
UErrorCode &status);
480 const char * getISO3Language()
const;
487 const char * getISO3Country()
const;
496 uint32_t getLCID(
void)
const;
511 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);
798 return &baseName[variantBegin];
const char * getLanguage() const
Returns the locale's ISO-639 language code.
#define ULOC_LANG_CAPACITY
Useful constant for the maximum size of the language part of a locale ID.
const char * getScript() const
Returns the locale's ISO-15924 abbreviation script code.
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.
const char * getName() const
Returns the programmatic name of the entire locale, with the language, country and variant separated ...
#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...
const char * getCountry() const
Returns the locale's ISO-3166 country code.
void locale_available_init()
const char * getVariant() const
Returns the locale's variant code.
#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.
UBool isBogus(void) const
Gets the bogus state.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
C API: Platform Utilities.
UBool operator!=(const Locale &other) const
Checks if two locale keys are not the same.
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.