Lines Matching refs:Locale
61 * Test Collator::createInstance(... version...) for some locale. Called by TestProperty().
64 TestOpenVersion(IntlTest &test, const Locale &locale) {
70 collator1=Collator::createInstance(locale, errorCode);
77 collator2=Collator::createInstance(locale, version1, errorCode);
81 test.errln("error: Collator::createInstance(\"%s\", (%s collator)->getVersion()) returns a different collator\n", locale.getName(), locale.getName());
85 test.errln("error: Collator::createInstance(\"%s\", (%s collator)->getVersion()) fails: %s\n", locale.getName(), locale.getName(), u_errorName(errorCode));
114 col = Collator::createInstance(Locale::getEnglish(), success);
120 StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success);
122 errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success));
183 logln(Collator::getDisplayName(Locale::getUS(), Locale::getGerman(), name));
187 logln(Collator::getDisplayName(Locale::getUS(), Locale::getEnglish(), name));
190 // weiv : this test is bogus if we're running on any machine that has different default locale than English.
192 logln("Get display name for the US English in default locale language : ");
193 logln(Collator::getDisplayName(Locale::US, name));
209 col = Collator::createInstance(Locale::getFrench(), success);
228 Locale abcd("ab", "CD", "");
251 Collator *frCol = Collator::createInstance(Locale::getCanadaFrench(), success);
260 // If the default locale isn't French, the French and non-French collators
262 if (frCol->getLocale(ULOC_ACTUAL_LOCALE, success) != Locale::getCanadaFrench()) {
286 col=Collator::createInstance(Locale(), versionArray, success);
323 Locale locale("aa", "AA");
324 col3 = (RuleBasedCollator *)Collator::createInstance(locale, status);
384 coll = (RuleBasedCollator *)Collator::createInstance(Locale::getEnglish(), status);
417 /* there is no reason to have canonical decomposition in en_US OR default locale */
488 col1 = Collator::createInstance(Locale::getEnglish(), success);
496 Locale dk("da", "DK", "");
505 col3 = Collator::createInstance(Locale::getEnglish(), success);
547 col = Collator::createInstance(Locale::getEnglish(), success);
656 col = Collator::createInstance(Locale::getEnglish(), success);
813 colerror=Collator::createInstance(Locale::getEnglish(), success);
868 Collator *col3 = Collator::createInstance(Locale::getEnglish(), success);
928 Collator *col1 = Collator::createInstance(Locale::getEnglish(), status);
982 col = Collator::createInstance(Locale::getEnglish(), success);
1043 const Locale* list = Collator::getAvailableLocales(count1);
1046 logln(UnicodeString("Locale name: ")
1069 logln(UnicodeString("Locale name is: ") + *locStr);
1082 logln(UnicodeString("Locale name is: ") + UnicodeString(locCStr));
1102 locale is NOT "en_US"
1104 Collator *col = Collator::createInstance(Locale::getEnglish(), status);
1259 LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));
1433 coll->getDisplayName(Locale::getCanadaFrench(), result);
1434 Locale::getCanadaFrench().getDisplayName(name);
1436 errln("Failure getting the correct name for locale en_US");
1439 coll->getDisplayName(Locale::getSimplifiedChinese(), result);
1440 Locale::getSimplifiedChinese().getDisplayName(name);
1442 errln("Failure getting the correct name for locale zh_SG");
1590 Locale locale;
1616 locale = coll->getLocale(ULOC_REQUESTED_LOCALE, status);
1617 if(locale != testStruct[i].requestedLocale) {
1618 log("[Coll %s]: Error in requested locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].requestedLocale, locale.getName());
1620 locale = coll->getLocale(ULOC_VALID_LOCALE, status);
1621 if(locale != testStruct[i].validLocale) {
1622 log("[Coll %s]: Error in valid locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].validLocale, locale.getName());
1624 locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status);
1625 if(locale != testStruct[i].actualLocale) {
1626 log("[Coll %s]: Error in actual locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].actualLocale, locale.getName());
1631 /* completely non-existant locale for collator should get a default collator */
1633 Collator *defaultColl = Collator::createInstance((const Locale)NULL, status);
1642 log("Nonexisting locale didn't preserve the requested locale\n");
1646 log("Valid locale for nonexisting locale locale collator differs "
1647 "from valid locale for default collator\n");
1651 log("Actual locale for nonexisting locale locale collator differs "
1652 "from actual locale for default collator\n");
1662 locale = coll->getLocale(ULOC_REQUESTED_LOCALE, status);
1663 if(!locale.isBogus()) {
1664 log("For collator instantiated from rules, requested locale %s is not bogus\n", locale.getName());
1666 locale = coll->getLocale(ULOC_VALID_LOCALE, status);
1667 if(!locale.isBogus()) {
1668 log("For collator instantiated from rules, valid locale %s is not bogus\n", locale.getName());
1670 locale = coll->getLocale(ULOC_ACTUAL_LOCALE, status);
1671 if(!locale.isBogus()) {
1672 log("For collator instantiated from rules, actual locale %s is not bogus\n", locale.getName());
1695 Collator *coll = Collator::createInstance(Locale("sh"), status);
1934 virtual Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
1957 virtual void setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale);
2059 Locale TestCollator::getLocale(ULocDataLocaleType type, UErrorCode& status) const
2153 void TestCollator::setLocales(const Locale& requestedLocale, const Locale& validLocale, const Locale& actualLocale)
2192 Locale loc1 = Locale::getGermany();
2193 Locale loc2 = Locale::getFrance();
2197 col1.getDisplayName(loc1, loc2, displayName); // de_DE collator in fr_FR locale