|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.localization.LocaleDetector
This class returns a Locale object based on the HTTP Accept-Language header. This class is based on examples from Jason Hunter's book Java Servlet Programming.
Constructor Summary | |
LocaleDetector()
Deprecated. |
Method Summary | |
static java.util.Locale |
getLocale(RunData data)
Deprecated. Attempts to pull the "Accept-Language" header out of the HttpServletRequest object and then parse it. |
static java.util.Locale |
getLocale(java.lang.String languageHeader)
Deprecated. This method parses the Accept-Language header and attempts to create a Locale out of it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocaleDetector()
Method Detail |
public static java.util.Locale getLocale(RunData data)
data
- Turbine information.
public static java.util.Locale getLocale(java.lang.String languageHeader)
languageHeader
- A String with the language header.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |