1 *java.util.spi.LocaleNameProvider* *LocaleNameProvider* An abstract class for se
3 public abstract class LocaleNameProvider
4 extends |java.util.spi.LocaleServiceProvider|
6 |java.util.spi.LocaleNameProvider_Description|
7 |java.util.spi.LocaleNameProvider_Fields|
8 |java.util.spi.LocaleNameProvider_Constructors|
9 |java.util.spi.LocaleNameProvider_Methods|
11 ================================================================================
13 *java.util.spi.LocaleNameProvider_Constructors*
14 |java.util.spi.LocaleNameProvider()|Sole constructor.
16 *java.util.spi.LocaleNameProvider_Methods*
17 |java.util.spi.LocaleNameProvider.getDisplayCountry(String,Locale)|Returns a lo
18 |java.util.spi.LocaleNameProvider.getDisplayLanguage(String,Locale)|Returns a l
19 |java.util.spi.LocaleNameProvider.getDisplayVariant(String,Locale)|Returns a lo
21 *java.util.spi.LocaleNameProvider_Description*
23 An abstract class for service providers that provide localized names for the
24 Locale(|java.util.Locale|) class.
28 *java.util.spi.LocaleNameProvider()*
30 protected LocaleNameProvider()
32 Sole constructor. (For invocation by subclass constructors, typically
36 *java.util.spi.LocaleNameProvider.getDisplayCountry(String,Locale)*
38 public abstract |java.lang.String| getDisplayCountry(
39 java.lang.String countryCode,
40 java.util.Locale locale)
42 Returns a localized name for the given ISO 3166 country code and the given
43 locale that is appropriate for display to the user. For example, if countryCode
44 is "FR" and locale is en_US, getDisplayCountry() will return "France"; if
45 countryCode is "US" and locale is fr_FR, getDisplayCountry() will return
46 "Etats-Unis". If the name returned cannot be localized according to locale,
47 (say, the provider does not have a Japanese name for Croatia), this method
51 countryCode - the ISO 3166 country code string in the form of two upper-case letters between
52 'A' (U+0041) and 'Z' (U+005A)
53 locale - the desired locale
55 Returns: the name of the given country code for the specified locale, or null if it's
58 *java.util.spi.LocaleNameProvider.getDisplayLanguage(String,Locale)*
60 public abstract |java.lang.String| getDisplayLanguage(
61 java.lang.String languageCode,
62 java.util.Locale locale)
64 Returns a localized name for the given ISO 639 language code and the given
65 locale that is appropriate for display to the user. For example, if
66 languageCode is "fr" and locale is en_US, getDisplayLanguage() will return
67 "French"; if languageCode is "en" and locale is fr_FR, getDisplayLanguage()
68 will return "anglais". If the name returned cannot be localized according to
69 locale, (say, the provider does not have a Japanese name for Croatian), this
73 languageCode - the ISO 639 language code string in the form of two lower-case letters between
74 'a' (U+0061) and 'z' (U+007A)
75 locale - the desired locale
77 Returns: the name of the given language code for the specified locale, or null if it's
80 *java.util.spi.LocaleNameProvider.getDisplayVariant(String,Locale)*
82 public abstract |java.lang.String| getDisplayVariant(
83 java.lang.String variant,
84 java.util.Locale locale)
86 Returns a localized name for the given variant code and the given locale that
87 is appropriate for display to the user. If the name returned cannot be
88 localized according to locale, this method returns null.
91 variant - the variant string
92 locale - the desired locale
94 Returns: the name of the given variant string for the specified locale, or null if it's