This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
java.util.spi
class LocaleNameProvider
public abstract class LocaleNameProvider
extends LocaleServiceProvider
An abstract class for service providers that
provide localized names for the
{@link java.util.Locale Locale} class.
Constructor Summary |
protected |
Sole constructor.
|
Method Summary |
abstract String |
Returns a localized name for the given ISO 3166 country code and the
given locale that is appropriate for display to the user.
|
abstract String |
Returns a localized name for the given ISO 639 language code and the
given locale that is appropriate for display to the user.
|
abstract String |
Returns a localized name for the given variant code and the given locale that
is appropriate for display to the user.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocaleNameProvider
protected LocaleNameProvider()
-
Sole constructor. (For invocation by subclass constructors, typically
implicit.)
getDisplayCountry
public abstract String getDisplayCountry(String countryCode,
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.
- Parameters:
countryCode
- the ISO 3166 country code string in the form of two
upper-case letters between 'A' (U+0041) and 'Z' (U+005A)
locale
- the desired locale
- Returns:
- the name of the given country code for the specified locale, or null if it's not
available.
getDisplayLanguage
public abstract String getDisplayLanguage(String languageCode,
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.
- Parameters:
languageCode
- the ISO 639 language code string in the form of two
lower-case letters between 'a' (U+0061) and 'z' (U+007A)
locale
- the desired locale
- Returns:
- the name of the given language code for the specified locale, or null if it's not
available.
getDisplayVariant
public abstract String getDisplayVariant(String variant,
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.
- Parameters:
variant
- the variant string
locale
- the desired locale
- Returns:
- the name of the given variant string for the specified locale, or null if it's not
available.
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.