Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.locale
Class LocaleHelper  view LocaleHelper download LocaleHelper.java

java.lang.Object
  extended bygnu.java.locale.LocaleHelper

public class LocaleHelper
extends java.lang.Object

This class provides common helper methods for handling localized data.


Constructor Summary
LocaleHelper()
           
 
Method Summary
static java.util.Locale[] getCollatorLocales()
          Return an array of all the locales for which there is a java.text.Collator instance.
static int getLocaleCount()
          Return the number of locales we know of.
static java.lang.String getLocaleName(int n)
          Return the Nth locale name.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleHelper

public LocaleHelper()
Method Detail

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.