lumis.util
Class LocaleUtil
java.lang.Object
lumis.util.LocaleUtil
@StableMinor(version="6.2",
sinceVersion="4.0")
public abstract class LocaleUtil
- extends Object
Utility class for Locale related operations
- Since:
- 4.0.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALE_ATTRIBUTE_NAME
public static final String LOCALE_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
LocaleUtil
public LocaleUtil()
FromString
public static Locale FromString(String locale)
throws PortalException
- Throws:
PortalException
fromXMLLang
public static Locale fromXMLLang(String xmlLang)
- Returns the locale corresponding to a String following XML lang syntax
(e.g.: en-US).
- Parameters:
xmlLang
- the XML lang value, according to the
RFC3066.
- Returns:
- the locale.
- Throws:
IllegalArgumentException
- if xmlLang is null
or is
an invalid locale identifier.- Since:
- 5.5.0
fromRequest
public static Locale fromRequest(HttpServletRequest request)
throws PortalException
- Throws:
PortalException
Lumisportal 6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.