List of usage examples for org.springframework.web.servlet.i18n LocaleChangeInterceptor setParamName
public void setParamName(String paramName)
From source file:config.web.i18nConfig.java
@Bean(name = "localeChangeInterceptor") public LocaleChangeInterceptor provideLocaleChangeInterceptor() { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("lang"); return localeChangeInterceptor; }
From source file:com.project.framework.configuration.WebMvcConfig.java
@Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor(); interceptor.setParamName("lang"); registry.addInterceptor(interceptor); }
From source file:cn.edu.zjnu.acm.judge.config.LocaleConfiguration.java
@Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("lang"); localeChangeInterceptor.setIgnoreInvalidLocale(true); registry.addInterceptor(localeChangeInterceptor); }
From source file:org.obiba.mica.config.LocaleConfiguration.java
@Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("language"); registry.addInterceptor(localeChangeInterceptor); }
From source file:fi.helsinki.opintoni.config.LocaleConfiguration.java
@Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("language"); registry.addInterceptor(localeChangeInterceptor); }
From source file:org.openwms.TransportationStarter.java
public @Bean LocaleChangeInterceptor localeChangeInterceptor() { LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); lci.setParamName("lang"); return lci;/* w w w . j av a2s . c o m*/ }
From source file:br.com.mv.modulo.WebConfig.java
@Bean public LocaleChangeInterceptor localeChangeInterceptor() { LocaleChangeInterceptor lci = new LocaleChangeInterceptor(); lci.setParamName("lang"); return lci;//from w w w.j a v a 2s . c om }
From source file:com.vgorcinschi.concordiafootballmanager.web.WebConfig.java
@Override public void addInterceptors(InterceptorRegistry registry) { super.addInterceptors(registry); LocaleChangeInterceptor lCi = new LocaleChangeInterceptor(); lCi.setParamName("myLocale"); registry.addInterceptor(lCi);/* w w w .ja va 2 s. c o m*/ }
From source file:de.whs.poodle.Poodle.java
@Bean @Autowired/*from w w w .j a va 2 s . c o m*/ public WebMvcConfigurerAdapter webMvcConfigurerAdapter(MessageSource messageSource) { return new WebMvcConfigurerAdapter() { /* Add LocaleChangeInterceptor which allows us to change the * locale of the LocaleResolver by simply appending a GET parameter * (e.g. lang=de) to the current URL. */ @Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor l = new LocaleChangeInterceptor(); l.setParamName("lang"); registry.addInterceptor(l); } /* By default, the messages for Java Bean Validation (@Size, @Max etc.) have * to be defined in a separate MessageSource (ValidationMessages.properties). * We define our own validator here so we can set it to use our default * MessageSource and define all message codes in one single file. */ @Override public Validator getValidator() { LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean(); bean.setValidationMessageSource(messageSource); return bean; } }; }
From source file:rashjz.info.com.az.config.SpringWebConfig.java
@Override //?mylocale=en public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor(); interceptor.setParamName("mylocale"); registry.addInterceptor(interceptor); }