AW: Wrong fallback language
martin.sobotka at inet-logistics.com
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 , so might be helpful to look at the actual Javadocs for the various concrete LocaleResolver impl classes, which are mostly linked from here . Looks like the AcceptHeader-, Cookie- and Session- ones all do, either directly in the impl or via the abstract base class AbstractLocaleResolver.
>  http://docs.spring.io/spring/docs/4.3.7.RELEASE/spring-framework-reference/html/mvc.html#mvc-localeresolver
>  http://docs.spring.io/spring/docs/4.3.7.RELEASE/javadoc-api/org/springframework/web/servlet/LocaleResolver.html
I'll take a look on the real implementations.
More information about the users