This locale resolver inspects a Cookie that might exist on the client to see if a Locale or TimeZone
is specified. If so, it uses the specified details. Using the properties of this locale resolver, you can
specify the name of the cookie as well as the maximum age. Find below an example of defining a
is specified. If so, it uses the specified details. Using the properties of this locale resolver, you can
specify the name of the cookie as well as the maximum age. Find below an example of defining a
CookieLocaleResolver.
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
<property name="cookieName" value="clientlanguage"/>
<!-- in seconds. If set to -1, the cookie is not persisted (deleted when browser shuts down) -->
<property name="cookieMaxAge" value="100000"/>
</bean>