public class LocaleInfo extends 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 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 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 . |
String |
getLocaleName()
Returns the name of this locale, such as "default, "en_US", etc.
|
static String |
getLocaleNativeDisplayName(String localeName)
Returns the display name of the requested locale in its native locale, if
possible.
|
static 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 String[] getAvailableLocaleNames()
public static final LocaleInfo getCurrentLocale()
public static final String getLocaleCookieName()
locale.cookie
.public static String getLocaleNativeDisplayName(String localeName)
localeName
- the name of the locale to lookup.public static String getLocaleQueryParam()
locale.queryparam
.public static boolean hasAnyRTL()
public final DateTimeConstants getDateTimeConstants()
public final DateTimeFormatInfo getDateTimeFormatInfo()
public final String getLocaleName()
public final LocalizedNames getLocalizedNames()
LocalizedNames
for this locale.public final NumberConstants getNumberConstants()
public final boolean isRTL()
Copyright © 2018. All rights reserved.