mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-19 11:45:45 +00:00
ICU-3549 add getAvailableULocales
X-SVN-Rev: 15220
This commit is contained in:
parent
ddc794608f
commit
f3b41d0047
1 changed files with 9 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue