@StableMinor(version="7.1", 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) |
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
public static Locale FromString(String locale) throws PortalException
PortalException
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
Lumisportal 7.1.1.140331 - Copyright © 2006–2014 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.