Hi Dan,
your example MVC app on internationalization is not working with Spring Boot 2.1.3, as this version resolves the locale from the browser's accept-language header, which will always override the settings from application.properties.
I had to provide a minimal WebMvcConfigurer to allow changing the locale via a request parameter to get it to work.
`/** */
@configuration
public class WebConfig implements WebMvcConfigurer {
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver localeResolver = new SessionLocaleResolver();
return localeResolver;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("lang");
registry.addInterceptor(localeChangeInterceptor);
WebMvcConfigurer.super.addInterceptors(registry);
}
}`
Hi Dan,
your example MVC app on internationalization is not working with Spring Boot 2.1.3, as this version resolves the locale from the browser's accept-language header, which will always override the settings from application.properties.
I had to provide a minimal WebMvcConfigurer to allow changing the locale via a request parameter to get it to work.
`/** */
@configuration
public class WebConfig implements WebMvcConfigurer {
}`