Exemple #1
0
 @Bean
 public CookieLocaleResolver localeResolver() {
   CookieLocaleResolver localeResolver = new CookieLocaleResolver();
   Locale defaultLocale = new Locale("fr");
   localeResolver.setDefaultLocale(defaultLocale);
   return localeResolver;
 }
Exemple #2
0
 @Bean(name = "localeResolver")
 public LocaleResolver localeResolver() {
   CookieLocaleResolver localeResolver = new CookieLocaleResolver();
   localeResolver.setCookieName("holiday_locale");
   localeResolver.setDefaultLocale(new Locale("en"));
   return localeResolver;
 }
 @Bean
 public LocaleResolver localeResolver() {
   CookieLocaleResolver localeResolver = new CookieLocaleResolver();
   localeResolver.setDefaultLocale(Locale.ENGLISH);
   localeResolver.setCookieMaxAge(604800);
   return localeResolver;
 }
 @Bean
 public LocaleResolver localeResolver() {
   CookieLocaleResolver resolver = new CookieLocaleResolver();
   resolver.setDefaultLocale(new Locale("en"));
   resolver.setCookieName("cookie_name");
   resolver.setCookieMaxAge(4800);
   return resolver;
 }
 @Bean
 public LocaleResolver localeResolver() {
   CookieLocaleResolver resolver = new CookieLocaleResolver();
   resolver.setDefaultLocale(new Locale("ru"));
   resolver.setCookieName("localeCookie");
   resolver.setCookieMaxAge(7 * 24 * 3600);
   return resolver;
 }
 @Bean
 public LocaleResolver localeResolver() {
   CookieLocaleResolver localeResolver = new CookieLocaleResolver();
   localeResolver.setDefaultLocale(Locale.US);
   return localeResolver;
 }