コード例 #1
0
ファイル: WebMvcConfiguration.java プロジェクト: nmine/poc
 @Bean
 public CookieLocaleResolver localeResolver() {
   CookieLocaleResolver localeResolver = new CookieLocaleResolver();
   Locale defaultLocale = new Locale("fr");
   localeResolver.setDefaultLocale(defaultLocale);
   return localeResolver;
 }
コード例 #2
0
ファイル: MvcConfig.java プロジェクト: Thomas-Adams/holiday
 @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
ファイル: WebConfig.java プロジェクト: alexeymaslov/qreal-web
 @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;
 }