public final class CLocale extends Object
locale
client property can be specified using either a meta tag, as part of the query string in the host page’s URL or from default platform locale.Modifier and Type | Field and Description |
---|---|
static CLocale |
CANADA
Useful constant for
Region.CANADA . |
static CLocale |
CANADA_FRENCH
Useful constant for
Region.CANADA , for Language.FRENCH . |
static CLocale |
CHINA
Useful constant for
Region.CHINA . |
static CLocale |
FRANCE
Useful constant for
Region.FRANCE . |
static CLocale |
GERMANY
Useful constant for
Region.GERMANY . |
static CLocale |
ITALY
Useful constant for
Region.ITALY . |
static CLocale |
JAPAN
Useful constant for
Region.JAPAN . |
static String |
LOCALE_QUERY_STRING_PARAM_KEY
Query string parameter key, used to retrieve the locale value, dynamically.
|
static CLocale |
RUSSIA
Useful constant for
Region.RUSSIA . |
static CLocale |
UK
Useful constant for
Region.UNITED_KINGDOM . |
static CLocale |
US
Useful constant for
Region.UNITED_STATES . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static CLocale |
getDefault()
Gets the current value of the default locale for this instance.
|
String |
getIdentifier()
Returns the locale identifier which consists of a language identifier and extension tags.
|
Language |
getLanguage()
Returns the language of the locale.
|
Region |
getRegion()
Returns the region of the locale.
It could be null . |
Script |
getScript()
Returns the script code of the locale.
It could be null . |
String |
getVariantAndExtension()
Returns the variant and extension parts of the locale.
It could be null . |
int |
hashCode() |
static boolean |
mustKeepDefaultsAligned()
Returns
true if the default locale must kept aligned with the Options.setLocale(CLocale) . |
static void |
setDefault(CLocale locale)
Sets the current value of the default locale for this instance.
|
static void |
setMustKeepDefaultsAligned(boolean keptAlignedWithDefaults)
Sets
true if the default locale must kept aligned with the Options.setLocale(CLocale) . |
String |
toString() |
public static final CLocale FRANCE
Region.FRANCE
.public static final CLocale GERMANY
Region.GERMANY
.public static final CLocale ITALY
Region.ITALY
.public static final CLocale JAPAN
Region.JAPAN
.public static final CLocale CHINA
Region.CHINA
.public static final CLocale UK
Region.UNITED_KINGDOM
.public static final CLocale US
Region.UNITED_STATES
.public static final CLocale CANADA
Region.CANADA
.public static final CLocale CANADA_FRENCH
Region.CANADA
, for Language.FRENCH
.public static final CLocale RUSSIA
Region.RUSSIA
.public static final String LOCALE_QUERY_STRING_PARAM_KEY
public String getIdentifier()
public Language getLanguage()
public Script getScript()
null
.null
.public Region getRegion()
null
.null
.public String getVariantAndExtension()
null
.null
.public static boolean mustKeepDefaultsAligned()
true
if the default locale must kept aligned with the Options.setLocale(CLocale)
.true
if the default locale must kept aligned with the Options.setLocale(CLocale)
public static void setMustKeepDefaultsAligned(boolean keptAlignedWithDefaults)
true
if the default locale must kept aligned with the Options.setLocale(CLocale)
.keptAlignedWithDefaults
- true
if the default locale must kept aligned with the Options.setLocale(CLocale)
public static void setDefault(CLocale locale)
locale
- the default locale for this instancepublic static CLocale getDefault()