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