LocaleNameProviderpublic abstract class LocaleNameProvider extends LocaleServiceProvider An abstract class for service providers that
provide localized names for the
{@link java.util.Locale Locale} class. |
Constructors Summary |
---|
protected LocaleNameProvider()Sole constructor. (For invocation by subclass constructors, typically
implicit.)
|
Methods Summary |
---|
public abstract java.lang.String | getDisplayCountry(java.lang.String countryCode, java.util.Locale locale)Returns a localized name for the given ISO 3166 country code and the
given locale that is appropriate for display to the user.
For example, if countryCode is "FR" and locale
is en_US, getDisplayCountry() will return "France"; if countryCode
is "US" and locale is fr_FR, getDisplayCountry() will return "Etats-Unis".
If the name returned cannot be localized according to locale ,
(say, the provider does not have a Japanese name for Croatia),
this method returns null.
| public abstract java.lang.String | getDisplayLanguage(java.lang.String languageCode, java.util.Locale locale)Returns a localized name for the given ISO 639 language code and the
given locale that is appropriate for display to the user.
For example, if languageCode is "fr" and locale
is en_US, getDisplayLanguage() will return "French"; if languageCode
is "en" and locale is fr_FR, getDisplayLanguage() will return "anglais".
If the name returned cannot be localized according to locale ,
(say, the provider does not have a Japanese name for Croatian),
this method returns null.
| public abstract java.lang.String | getDisplayVariant(java.lang.String variant, java.util.Locale locale)Returns a localized name for the given variant code and the given locale that
is appropriate for display to the user.
If the name returned cannot be localized according to locale ,
this method returns null.
|
|