java.lang.Object
com.aoapps.lang.i18n.Locales
Convenience static access to more locales than provided by the stock Locale class.
- Author:
- AO Industries, Inc.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Locale
static final Locale
static final Locale
Deprecated.static final Locale
Deprecated.Please useLocale.CANADA_FRENCH
directly.static final Locale
static final Locale
Deprecated.Please useLocale.CHINA
directly.static final Locale
Deprecated.Please useLocale.CHINESE
directly.static final Locale
static final Locale
static final Locale
static final Locale
static final Locale
Deprecated.Please useLocale.ENGLISH
directly.static final Locale
static final Locale
static final Locale
Deprecated.Please useLocale.FRANCE
directly.static final Locale
Deprecated.Please useLocale.FRENCH
directly.static final Locale
Deprecated.Please useLocale.GERMAN
directly.static final Locale
Deprecated.Please useLocale.GERMANY
directly.static final Locale
static final Locale
HEBREW is now "he" - this matches Java's backward compatibility "iw".static final Locale
static final Locale
static final Locale
static final Locale
INDONESIAN is now "id" - this matches Java's backward compatibility "in".static final Locale
Deprecated.Please useLocale.ITALIAN
directly.static final Locale
Deprecated.Please useLocale.ITALY
directly.static final Locale
Deprecated.Please useLocale.JAPAN
directly.static final Locale
Deprecated.Please useLocale.JAPANESE
directly.static final Locale
Deprecated.Please useLocale.KOREA
directly.static final Locale
Deprecated.Please useLocale.KOREAN
directly.static final Locale
static final Locale
static final Locale
static final Locale
static final Locale
static final Locale
static final Locale
Deprecated.Please useLocale.PRC
directly.static final Locale
static final Locale
Deprecated.Please useLocale.ROOT
directly.static final Locale
static final Locale
static final Locale
Deprecated.Please useLocale.SIMPLIFIED_CHINESE
directly.static final Locale
static final Locale
static final Locale
static final Locale
static final Locale
Deprecated.Please useLocale.TAIWAN
directly.static final Locale
Deprecated.Please useLocale.TRADITIONAL_CHINESE
directly.static final Locale
static final Locale
Deprecated.Please useLocale.UK
directly.static final Locale
Deprecated.Please useLocale.US
directly. -
Method Summary
Modifier and TypeMethodDescriptionstatic Locale
getCachedLocale
(String language, String country, String variant) Gets a cached locale instance.static boolean
isRightToLeft
(Locale locale) Determines if the provided locale should be displayed from right to left.static Locale
parseLocale
(String locale) Parses locales from theirtoString
representation.
-
Field Details
-
ROOT
Deprecated.Please useLocale.ROOT
directly. -
ARABIC
-
BULGARIAN
-
CATALAN
-
CZECH
-
DANISH
-
GERMAN
Deprecated.Please useLocale.GERMAN
directly. -
GREEK
-
ENGLISH
Deprecated.Please useLocale.ENGLISH
directly. -
SPANISH
-
ESTONIAN
-
PERSIAN
-
FINNISH
-
FRENCH
Deprecated.Please useLocale.FRENCH
directly. -
HINDI
-
CROATIAN
-
HUNGARIAN
-
INDONESIAN
INDONESIAN is now "id" - this matches Java's backward compatibility "in". -
ICELANDIC
-
ITALIAN
Deprecated.Please useLocale.ITALIAN
directly. -
JAPANESE
Deprecated.Please useLocale.JAPANESE
directly. -
KOREAN
Deprecated.Please useLocale.KOREAN
directly. -
HEBREW
HEBREW is now "he" - this matches Java's backward compatibility "iw". -
LITHUANIAN
-
LATVIAN
-
DUTCH
-
NORWEGIAN
-
POLISH
-
PORTUGUESE
-
ROMANIAN
-
RUSSIAN
-
SLOVAK
-
SLOVENIAN
-
SERBIAN
-
SWEDISH
-
TURKISH
-
CHINESE
Deprecated.Please useLocale.CHINESE
directly. -
SIMPLIFIED_CHINESE
Deprecated.Please useLocale.SIMPLIFIED_CHINESE
directly. -
TRADITIONAL_CHINESE
Deprecated.Please useLocale.TRADITIONAL_CHINESE
directly. -
FRANCE
Deprecated.Please useLocale.FRANCE
directly. -
GERMANY
Deprecated.Please useLocale.GERMANY
directly. -
ITALY
Deprecated.Please useLocale.ITALY
directly. -
JAPAN
Deprecated.Please useLocale.JAPAN
directly. -
KOREA
Deprecated.Please useLocale.KOREA
directly. -
CHINA
Deprecated.Please useLocale.CHINA
directly. -
PRC
Deprecated.Please useLocale.PRC
directly. -
TAIWAN
Deprecated.Please useLocale.TAIWAN
directly. -
UK
Deprecated.Please useLocale.UK
directly. -
US
Deprecated.Please useLocale.US
directly. -
CANADA
Deprecated.Please useLocale.CANADA
directly. -
CANADA_FRENCH
Deprecated.Please useLocale.CANADA_FRENCH
directly.
-
-
Method Details
-
getCachedLocale
Gets a cached locale instance. -
parseLocale
Parses locales from theirtoString
representation. Language, country, and variant may be separated by underscore "_" or hyphen "-". Language is converted to lowercase. Country is converted to uppercase. Caches locales so the same instance will be returned for each combination of language, country, and variant.Locales are currently cached forever. Malicious external sources of locales could fill the heap space, so protect against this if needed.
-
isRightToLeft
Determines if the provided locale should be displayed from right to left.
-
Locale.CANADA
directly.