java.lang.Object
gnu.java.locale.LocaleHelper
- public class LocaleHelper
- extends java.lang.Object
This class provides common helper methods
for handling localized data.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocaleHelper
public LocaleHelper()
getLocalizedString
public static java.lang.String getLocalizedString(java.util.Locale inLocale,
java.lang.String key,
java.lang.String name,
boolean checkEnglish,
boolean checkRoot)
- This method is used by the localized name lookup methods to retrieve
the localized name of a particular piece of locale data.
If the display name can not be localized to the supplied
locale, it will fall back on other output in the following order:
- the localized name in the default locale
- the localized name in English (optional)
- the localized name in the root locale bundle (optional)
- the localized input string
If the supplied key is merely the empty string, then the empty string is
returned.
getCollatorLocales
public static java.util.Locale[] getCollatorLocales()
- Return an array of all the locales for which there is a
java.text.Collator instance. A new array is returned each time.
getLocaleCount
public static int getLocaleCount()
- Return the number of locales we know of.
getLocaleName
public static java.lang.String getLocaleName(int n)
- Return the Nth locale name.