Java Reference
In-Depth Information
Locale provides methods for getting the parts of the locale description.
The methods getCountry , getLanguage , and getVariant return the values
defined during construction. These are terse codes that most users will
not know. These methods have "display" variants getdisplayCountry , get-
displayLanguage , and getdisplayVariant that return human-readable ver-
sions of the values. The method getdisplayName returns a human-read-
able summary of the entire locale description, and toString returns the
terse equivalent, using underscores to separate the parts. These "dis-
play" methods return values that are localized according to the default
locale.
You can optionally provide a Locale argument to any of the "display"
methods to get a description of the given locale under the provided loc-
ale. For example, if we print the value of
Locale.ITALY.getDisplayCountry(Locale.FRANCE)
we get
Italie
the French name for Italy.
The methods getISO3Country and getISO3Language return three-character
ISO codes for the country and language of the locale, respectively.
 
Search WWH ::




Custom Search