The Locale class is instantiated to produce objects that describe a geographical or cultural region. It is one of several classes that provide you with the ability to write programs that can execute in different international environments.
For example, the formats used to display dates, times, and numbers are different in various regions.
The Locale class defines the following constants that are useful for dealing with the most common locales:
CANADA | GERMAN | KOREAN |
CANADA_FRENCH | GERMANY | PRC |
CHINA | ITALIAN | SIMPLIFIED_CHINESE | ||
CHINESE | ITALY | TAIWAN | ||
ENGLISH | JAPAN | TRADITIONAL_CHINESE | ||
FRANCE | JAPANESE | UK | ||
FRENCH | KOREA | US |
For example, the expression Locale.CANADA represents the Locale object for Canada. The constructors for Locale are
Locale(String language)
Locale(String language, String country)
Locale(String language, String country, String data)