ICU-3549 add getAvailableULocales

X-SVN-Rev: 15220
This commit is contained in:
Alan Liu 2004-05-09 13:37:31 +00:00
parent ddc794608f
commit f3b41d0047

View file

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2003, International Business Machines Corporation and *
* Copyright (C) 2003-2004, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -81,12 +81,20 @@ final class CollatorServiceShim extends Collator.ServiceShim {
}
Locale[] getAvailableLocales() {
// TODO rewrite this to just wrap getAvailableULocales later
if (service.isDefault()) {
return ICUResourceBundle.getAvailableLocales(UResourceBundle.ICU_COLLATION_BASE_NAME);
}
return service.getAvailableLocales();
}
ULocale[] getAvailableULocales() {
if (service.isDefault()) {
return ICUResourceBundle.getAvailableULocales(UResourceBundle.ICU_COLLATION_BASE_NAME);
}
return service.getAvailableULocales();
}
String getDisplayName(Locale objectLocale, Locale displayLocale) {
String id = LocaleUtility.canonicalLocaleString(objectLocale);
return service.getDisplayName(id, displayLocale);