@@ -0,0 +1,1644 @@
+package ru.evgeniyosipov.jbelly.config;%0A%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.web.servlet.LocaleResolver;%0Aimport org.springframework.web.servlet.config.annotation.InterceptorRegistry;%0Aimport org.springframework.web.servlet.config.annotation.WebMvcConfigurer;%0Aimport org.springframework.web.servlet.i18n.LocaleChangeInterceptor;%0Aimport org.springframework.web.servlet.i18n.SessionLocaleResolver;%0A%0Aimport java.util.Locale;%0A%0A@Configuration%0Apublic class LocaleConfig implements WebMvcConfigurer %7B%0A%0A    /**%0A     * @return default locale set by the user%0A     */%0A    @Bean(name = %22localeResolver%22)%0A    public LocaleResolver localeResolver() %7B%0A        SessionLocaleResolver slr = new SessionLocaleResolver();%0A        //Locale russianLocale = new Locale(%22ru%22, %22RU%22);%0A        //slr.setDefaultLocale(russianLocale);%0A        slr.setDefaultLocale(Locale.ENGLISH);%0A        return slr;%0A    %7D%0A%0A    /**%0A     * An interceptor bean that will switch to a new locale based on the value of the language parameter appended to a request:%0A     *%0A     * @param registry%0A     * @language should be the name of the request param i.e localhost:8080/?lang=ru%0A     * %3Cp%3E%0A     * Note: All requests to the backend needing Internationalization should have the %22lang%22 request param%0A     */%0A    @Override%0A    public void addInterceptors(InterceptorRegistry registry) %7B%0A        LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();%0A        localeChangeInterceptor.setParamName(%22lang%22);%0A        registry.addInterceptor(localeChangeInterceptor);%0A    %7D%0A%7D

Add localization configuration class