コード例 #1
0
 @Bean
 public SessionLocaleResolver localeResolver() {
   SessionLocaleResolver localeResolver = new SessionLocaleResolver();
   localeResolver.setDefaultLocale(new Locale("en"));
   localeResolver.setDefaultTimeZone(TimeZone.getDefault());
   return localeResolver;
 }
コード例 #2
0
 @Bean
 public LocaleResolver localeResolver() {
   //        return new CookieLocaleResolver();
   SessionLocaleResolver slr = new SessionLocaleResolver();
   slr.setDefaultLocale(Locale.CHINA);
   return slr;
 }
コード例 #3
0
  public SessionLocaleResolver sessionLocaleResolver() {

    SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
    Locale defaultLocale = Locale.forLanguageTag("en_US");
    sessionLocaleResolver.setDefaultLocale(defaultLocale);

    return sessionLocaleResolver;
  }
コード例 #4
0
 @Bean
 public SessionLocaleResolver sessionLocaleResolver() {
   SessionLocaleResolver localeResolver = new SessionLocaleResolver();
   localeResolver.setDefaultLocale(new Locale("ru", "RU"));
   return localeResolver;
 }
コード例 #5
0
ファイル: WebMvcConfig.java プロジェクト: klimtoren/klimtoren
 @Bean
 public LocaleResolver localeResolver() {
   SessionLocaleResolver lr = new org.springframework.web.servlet.i18n.SessionLocaleResolver();
   lr.setDefaultLocale(Locale.ENGLISH);
   return lr;
 }
コード例 #6
0
ファイル: WebConfig.java プロジェクト: jdmr/demo
 @Bean
 public LocaleResolver localeResolver() {
   SessionLocaleResolver localeResolver = new SessionLocaleResolver();
   localeResolver.setDefaultLocale(new Locale("en_US"));
   return localeResolver;
 }
 @Bean
 public LocaleResolver localeResolver() {
   SessionLocaleResolver slr = new SessionLocaleResolver();
   slr.setDefaultLocale(Locale.getDefault());
   return slr;
 }
コード例 #8
0
 @Bean
 public LocaleResolver localeResolver() {
   SessionLocaleResolver resolver = new SessionLocaleResolver();
   resolver.setDefaultLocale(Locale.ENGLISH);
   return resolver;
 }
 @Bean
 public LocaleResolver localeResolver() {
   final SessionLocaleResolver slr = new SessionLocaleResolver();
   slr.setDefaultLocale(Locale.US);
   return slr;
 }