content: package com.adyen.demo.store.config;
  
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.web.servlet.LocaleResolver;
  import org.springframework.web.servlet.config.annotation.*;
  import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
  import tech.jhipster.config.locale.AngularCookieLocaleResolver;
  
  @Configuration
  public class LocaleConfiguration implements WebMvcConfigurer {
  
      @Bean
      public LocaleResolver localeResolver() {
          AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver();
          cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY");
          return cookieLocaleResolver;
      }
  
      @Override
      public void addInterceptors(InterceptorRegistry registry) {
          LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
          localeChangeInterceptor.setParamName("language");
          registry.addInterceptor(localeChangeInterceptor);
      }
  }
  