lumis.util
Class LocaleUtil
java.lang.Object
lumis.util.LocaleUtil
@StableMinor(version="5.5",
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 5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.