53 class StringEnumeration;
195 static const Locale &U_EXPORT2 getRoot(
void);
197 static const Locale &U_EXPORT2 getEnglish(
void);
199 static const Locale &U_EXPORT2 getFrench(
void);
201 static const Locale &U_EXPORT2 getGerman(
void);
203 static const Locale &U_EXPORT2 getItalian(
void);
205 static const Locale &U_EXPORT2 getJapanese(
void);
207 static const Locale &U_EXPORT2 getKorean(
void);
209 static const Locale &U_EXPORT2 getChinese(
void);
211 static const Locale &U_EXPORT2 getSimplifiedChinese(
void);
213 static const Locale &U_EXPORT2 getTraditionalChinese(
void);
216 static const Locale &U_EXPORT2 getFrance(
void);
218 static const Locale &U_EXPORT2 getGermany(
void);
220 static const Locale &U_EXPORT2 getItaly(
void);
222 static const Locale &U_EXPORT2 getJapan(
void);
224 static const Locale &U_EXPORT2 getKorea(
void);
226 static const Locale &U_EXPORT2 getChina(
void);
228 static const Locale &U_EXPORT2 getPRC(
void);
230 static const Locale &U_EXPORT2 getTaiwan(
void);
232 static const Locale &U_EXPORT2 getUK(
void);
234 static const Locale &U_EXPORT2 getUS(
void);
236 static const Locale &U_EXPORT2 getCanada(
void);
238 static const Locale &U_EXPORT2 getCanadaFrench(
void);
274 Locale(
const char * language,
275 const char * country = 0,
276 const char * variant = 0,
277 const char * keywordsAndValues = 0);
287 #ifndef U_HIDE_DRAFT_API
296 #endif // U_HIDE_DRAFT_API
313 #ifndef U_HIDE_DRAFT_API
324 #endif // U_HIDE_DRAFT_API
358 #ifndef U_HIDE_SYSTEM_API
374 static const Locale& U_EXPORT2 getDefault(
void);
388 static void U_EXPORT2 setDefault(
const Locale& newLocale,
392 #ifndef U_HIDE_DRAFT_API
437 template<
typename StringClass>
438 inline StringClass toLanguageTag(
UErrorCode& status)
const;
439 #endif // U_HIDE_DRAFT_API
450 static Locale U_EXPORT2 createFromName(
const char *name);
460 static Locale U_EXPORT2 createCanonical(
const char* name);
467 inline const char * getLanguage( )
const;
476 inline const char * getScript( )
const;
483 inline const char * getCountry( )
const;
490 inline const char * getVariant( )
const;
500 inline const char * getName()
const;
509 const char * getBaseName()
const;
511 #ifndef U_HIDE_DRAFT_API
573 #endif // U_HIDE_DRAFT_API
586 #ifndef U_HIDE_DRAFT_API
610 template<
typename StringClass,
typename OutputIterator>
611 inline void getKeywords(OutputIterator iterator,
UErrorCode& status)
const;
624 template<
typename StringClass,
typename OutputIterator>
625 inline void getUnicodeKeywords(OutputIterator iterator,
UErrorCode& status)
const;
627 #endif // U_HIDE_DRAFT_API
645 int32_t getKeywordValue(
const char* keywordName,
char *buffer, int32_t bufferCapacity,
UErrorCode &status)
const;
647 #ifndef U_HIDE_DRAFT_API
676 template<
typename StringClass>
707 template<
typename StringClass>
709 #endif // U_HIDE_DRAFT_API
730 void setKeywordValue(
const char* keywordName,
const char* keywordValue,
UErrorCode &status);
732 #ifndef U_HIDE_DRAFT_API
772 #endif // U_HIDE_DRAFT_API
780 const char * getISO3Language()
const;
787 const char * getISO3Country()
const;
796 uint32_t getLCID(
void)
const;
811 UBool isRightToLeft()
const;
948 int32_t hashCode(
void)
const;
965 UBool isBogus(
void)
const;
975 static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
985 static const char*
const* U_EXPORT2 getISOCountries();
995 static const char*
const* U_EXPORT2 getISOLanguages();
1002 static UClassID U_EXPORT2 getStaticClassID();
1012 #ifndef U_HIDE_INTERNAL_API
1017 void setFromPOSIXID(
const char *posixID);
1028 Locale& init(
const char* cLocaleID,
UBool canonicalize);
1043 static Locale *getLocaleCache(
void);
1048 int32_t variantBegin;
1057 static const Locale &getLocale(
int locid);
1063 friend Locale *locale_set_default_internal(
const char *,
UErrorCode& status);
1077 #ifndef U_HIDE_DRAFT_API
1078 template<
typename StringClass>
inline StringClass
1083 toLanguageTag(sink, status);
1086 #endif // U_HIDE_DRAFT_API
1089 Locale::getCountry()
const
1095 Locale::getLanguage()
const
1101 Locale::getScript()
const
1107 Locale::getVariant()
const
1109 return &baseName[variantBegin];
1113 Locale::getName()
const
1118 #ifndef U_HIDE_DRAFT_API
1120 template<
typename StringClass,
typename OutputIterator>
inline void
1121 Locale::getKeywords(OutputIterator iterator,
UErrorCode& status)
const
1128 int32_t resultLength;
1129 const char* buffer = keys->next(&resultLength, status);
1130 if (
U_FAILURE(status) || buffer ==
nullptr) {
1133 *iterator++ = StringClass(buffer, resultLength);
1137 template<
typename StringClass,
typename OutputIterator>
inline void
1138 Locale::getUnicodeKeywords(OutputIterator iterator,
UErrorCode& status)
const
1145 int32_t resultLength;
1146 const char* buffer = keys->next(&resultLength, status);
1147 if (
U_FAILURE(status) || buffer ==
nullptr) {
1150 *iterator++ = StringClass(buffer, resultLength);
1154 template<
typename StringClass>
inline StringClass
1159 getKeywordValue(keywordName, sink, status);
1163 template<
typename StringClass>
inline StringClass
1168 getUnicodeKeywordValue(keywordName, sink, status);
1172 #endif // U_HIDE_DRAFT_API
1175 Locale::isBogus(
void)
const {