AW: Wrong fallback language

Sobotka Martin martin.sobotka at
Wed May 31 03:08:50 EDT 2017

> I haven't reviewed the Spring MVC docs in awhile on this, but their LocaleResolver impls usually take a 'defaultLocale' property which sets the default if it is otherwise unspecified.  You can even see this in one of our examples (expand the 2nd one):

Thanks for the hint. The CookieLocaleResolver takes the property "defaultLocale". I tried this in the past with default values like "en" or "en-US" without success - fallback is still German.

> They don't really mention this in the Spring Framework locale docs [1],  so might be helpful to look at the actual Javadocs for the various concrete LocaleResolver impl classes, which are mostly linked from here [2].  Looks like the AcceptHeader-, Cookie- and Session- ones all do, either directly in the impl or via the abstract base class AbstractLocaleResolver.

> [1]
> [2]

I'll take a look on the real implementations.

Best Regards,

More information about the users mailing list