open class LocaleChangeInterceptor : HandlerInterceptorAdapter
Interceptor that allows for changing the current locale on every request, via a configurable request parameter (default parameter name: "locale").
Author
Juergen Hoeller
Author
Rossen Stoyanchev
Since
20.06.2003
See Also
org.springframework.web.servlet.LocaleResolver
LocaleChangeInterceptor()
Interceptor that allows for changing the current locale on every request, via a configurable request parameter (default parameter name: "locale"). |
static val DEFAULT_PARAM_NAME: String
Default name of the locale specification parameter: "locale". |
open fun getHttpMethods(): Array<String>
Return the configured HTTP methods. |
|
open fun getParamName(): String
Return the name of the parameter that contains a locale specification in a locale change request. |
|
open fun isIgnoreInvalidLocale(): Boolean
Return whether to ignore an invalid value for the locale parameter. |
|
open fun isLanguageTagCompliant(): Boolean
Return whether to use BCP 47 language tags instead of Java's legacy locale specification format. |
|
open fun preHandle(request: HttpServletRequest, response: HttpServletResponse, handler: Any): Boolean |
|
open fun setHttpMethods(vararg httpMethods: String): Unit
Configure the HTTP method(s) over which the locale can be changed. |
|
open fun setIgnoreInvalidLocale(ignoreInvalidLocale: Boolean): Unit
Set whether to ignore an invalid value for the locale parameter. |
|
open fun setLanguageTagCompliant(languageTagCompliant: Boolean): Unit
Specify whether to parse request parameter values as BCP 47 language tags instead of Java's legacy locale specification format. The default is |
|
open fun setParamName(paramName: String): Unit
Set the name of the parameter that contains a locale specification in a locale change request. Default is "locale". |