|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for web-based locale resolution strategies that allows for both locale resolution via the request and locale modification via request and response.
This interface allows for implementations based on request, session, cookies, etc. The default implementation is AcceptHeaderLocaleResolver, simply using the request's locale provided by the respective HTTP header.
Use RequestContext.getLocale() to retrieve the current locale in controllers or views, independent of the actual resolution strategy.
AcceptHeaderLocaleResolver
,
RequestContext.getLocale()
Method Summary | |
java.util.Locale |
resolveLocale(javax.servlet.http.HttpServletRequest request)
Resolve the current locale via the given request. |
void |
setLocale(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.util.Locale locale)
Set the current locale to the given one. |
Method Detail |
public java.util.Locale resolveLocale(javax.servlet.http.HttpServletRequest request)
request
- request to be used for resolution
public void setLocale(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.util.Locale locale)
request
- request to be used for locale modificationresponse
- response to be used for locale modificationlocale
- the new locale
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |