@StableMinor(version="12.4", sinceVersion="4.0") public abstract class LocaleUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
LOCALE_ATTRIBUTE_NAME |
Constructor and Description |
---|
LocaleUtil() |
Modifier and Type | Method and Description |
---|---|
static Locale |
fromRequest(HttpServletRequest request) |
static Locale |
fromString(String locale)
Returns the locale represented by the given string.
|
static Locale |
FromString(String locale)
Deprecated.
since 8.1.0 replaced by
fromString(String) . |
static Locale |
fromXMLLang(String xmlLang)
Returns the locale corresponding to a String following XML lang syntax
(e.g.: en-US).
|
public static final String LOCALE_ATTRIBUTE_NAME
@Deprecated public static Locale FromString(String locale) throws PortalException
fromString(String)
.PortalException
public static Locale fromString(String locale) throws PortalException
For more information, refer to Locale
.
locale
- the locale string.PortalException
Locale.Locale(String, String, String)
public static Locale fromXMLLang(String xmlLang)
xmlLang
- the XML lang value, according to the
RFC3066.IllegalArgumentException
- if xmlLang is null
or is
an invalid locale identifier.public static Locale fromRequest(HttpServletRequest request) throws PortalException
PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.