public class LocaleInfo
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
LocaleInfo()
Constructor to be used by subclasses, such as mock classes for testing.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
getAvailableLocaleNames()
Returns an array of available locale names.
|
static LocaleInfo |
getCurrentLocale()
Returns a LocaleInfo instance for the current locale.
|
DateTimeConstants |
getDateTimeConstants()
Returns a DateTimeConstants instance for this locale.
|
DateTimeFormatInfo |
getDateTimeFormatInfo()
Returns a DateTimeConstants instance for this locale.
|
static java.lang.String |
getLocaleCookieName()
Returns the name of the name of the cookie holding the locale to use,
which is defined in the config property
locale.cookie . |
java.lang.String |
getLocaleName()
Returns the name of this locale, such as "default, "en_US", etc.
|
static java.lang.String |
getLocaleNativeDisplayName(java.lang.String localeName)
Returns the display name of the requested locale in its native locale, if
possible.
|
static java.lang.String |
getLocaleQueryParam()
Returns the name of the query parameter holding the locale to use, which is
defined in the config property
locale.queryparam . |
LocalizedNames |
getLocalizedNames() |
NumberConstants |
getNumberConstants()
Returns a NumberConstants instance for this locale.
|
static boolean |
hasAnyRTL()
Returns true if any locale supported by this build of the app is RTL.
|
boolean |
isRTL()
Returns true if this locale is right-to-left instead of left-to-right.
|
protected LocaleInfo()
public static final java.lang.String[] getAvailableLocaleNames()
public static final LocaleInfo getCurrentLocale()
public static final java.lang.String getLocaleCookieName()
locale.cookie
.public static java.lang.String getLocaleNativeDisplayName(java.lang.String localeName)
localeName
- the name of the locale to lookup.public static java.lang.String getLocaleQueryParam()
locale.queryparam
.public static boolean hasAnyRTL()
public final DateTimeConstants getDateTimeConstants()
public final DateTimeFormatInfo getDateTimeFormatInfo()
public final java.lang.String getLocaleName()
public final LocalizedNames getLocalizedNames()
LocalizedNames
for this locale.public final NumberConstants getNumberConstants()
public final boolean isRTL()