LocaleResolver implementation that uses a cookie sent back to the user
in case of a custom setting, with a fallback to the specified default locale
or the request's accept-header locale.
This is particularly useful for stateless applications without user sessions.
The cookie may optionally contain an associated time zone value as well;
alternatively, you may specify a default time zone.
Custom controllers can override the user's locale and time zone by calling
#setLocale(Context) on the resolver, e.g. responding to a locale change
request. As a more convenient alternative, consider using
public void setLanguageTagCompliant(boolean languageTagCompliant)
Specify whether this resolver's cookies should be compliant with BCP 47
language tags instead of Java's legacy locale specification format.
The default is true, as of 5.1. Switch this to false
for rendering Java's legacy locale specification format. For parsing,
this resolver leniently accepts the legacy Locale.toString()
format as well as BCP 47 language tags in any case.