open class AcceptHeaderLocaleResolver : LocaleResolver
LocaleResolver implementation that simply uses the primary locale specified in the "accept-language" header of the HTTP request (that is, the locale sent by the client browser, normally that of the client's OS).
Note: Does not support setLocale, since the accept header can only be changed through changing the client's locale settings.
Author
Juergen Hoeller
Author
Rossen Stoyanchev
Since
27.02.2003
See Also
javax.servlet.http.HttpServletRequest#getLocale()
AcceptHeaderLocaleResolver()
LocaleResolver implementation that simply uses the primary locale specified in the "accept-language" header of the HTTP request (that is, the locale sent by the client browser, normally that of the client's OS). Note: Does not support |
open fun getDefaultLocale(): Locale
The configured default locale, if any. |
|
open fun getSupportedLocales(): MutableList<Locale>
Return the configured list of supported locales. |
|
open fun resolveLocale(request: HttpServletRequest): Locale |
|
open fun setDefaultLocale(defaultLocale: Locale): Unit
Configure a fixed default locale to fall back on if the request does not have an "Accept-Language" header. By default this is not set in which case when there is "Accept-Language" header, the default locale for the server is used as defined in |
|
open fun setLocale(request: HttpServletRequest, response: HttpServletResponse, locale: Locale): Unit |
|
open fun setSupportedLocales(locales: MutableList<Locale>): Unit
Configure supported locales to check against the requested locales determined via |