|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.internationalization.XPLocale
public class XPLocale
Represents information about a specific geographical, political, or cultural region. The information that this class represents include name of the country and language.
Constructor Summary | |
---|---|
XPLocale(java.util.Locale locale)
Creates an XPLocale from the platform-local equivalent. |
|
XPLocale(java.lang.String shortLocaleName)
Creates an XPLocale, initialized using the given locale string in the form language-country, based on the underlying platform library's ability to look up a named locale. |
|
XPLocale(java.lang.String language,
java.lang.String country)
Creates an XPLocale, initialized using the given language and country strings based on the underlying platform library's ability to look up a named locale. |
Method Summary | |
---|---|
static java.lang.String[] |
GetAvailableLocaleNames()
Returns an array of the display names of all locales installed in the runtime library. |
static XPLocale[] |
GetAvailableLocales()
Returns an array of all locales installed in the runtime library, in cross-platform (XPLocale) form. |
java.lang.String |
GetCountry()
Returns the country/region code for this locale, which will either be the empty string or an ISO 3166 2-letter code. |
static XPLocale |
GetDefault()
Returns an instance of XPLocale wrapping the platform default locale, determined by runtime or operating system localization settings. |
java.lang.String |
GetDisplayCountry()
Returns a name for the locale's country that is appropriate for display to the user. |
java.lang.String |
GetDisplayLanguage()
Returns a name for the locale's language that is appropriate for display to the user. |
java.lang.String |
GetDisplayName()
Returns a name for the locale that is appropriate for display to the user. |
java.lang.String |
GetLanguage()
Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code. |
java.lang.String |
GetShortName()
Returns a short name for the locale that has the form language-country, which can be used to construct an XPLocale object; or return just the language component if the Locale doesn't have an country component. |
java.util.Locale |
GetUnderlyingObject()
Returns the platform specific object that this class wraps. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPLocale(java.util.Locale locale)
locale
- the underlying Locale object.public XPLocale(java.lang.String shortLocaleName)
shortLocaleName
- a String in the form language or language-country (for example "en" or "zh-cn")public XPLocale(java.lang.String language, java.lang.String country)
language
- supported language to define Locale object.country
- country name to define Locale object.Method Detail |
---|
public static XPLocale[] GetAvailableLocales()
public static java.lang.String[] GetAvailableLocaleNames()
public java.lang.String GetCountry()
public static XPLocale GetDefault()
public java.lang.String GetDisplayCountry()
public java.lang.String GetLanguage()
public java.lang.String GetDisplayLanguage()
public java.lang.String GetDisplayName()
public java.lang.String GetShortName()
public java.util.Locale GetUnderlyingObject()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |