本文整理匯總了Java中org.springframework.web.servlet.i18n.SessionLocaleResolver.setDefaultLocale方法的典型用法代碼示例。如果您正苦於以下問題:Java SessionLocaleResolver.setDefaultLocale方法的具體用法?Java SessionLocaleResolver.setDefaultLocale怎麽用?Java SessionLocaleResolver.setDefaultLocale使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.web.servlet.i18n.SessionLocaleResolver
的用法示例。
在下文中一共展示了SessionLocaleResolver.setDefaultLocale方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver bean = new SessionLocaleResolver();
String locale = this.casProperties.getLocale().getDefaultValue();
this.log.debug("Setting default locale to [{}]", locale);
bean.setDefaultLocale(new Locale(locale));
return bean;
}
示例2: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
// 默認語言
slr.setDefaultLocale(Locale.CHINA);
return slr;
}
示例3: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
/**
* Set the LocaleResolver for the GUI portion of the application
* By default english pages with be returned to the user
* @return LocaleResolver
*/
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
slr.setDefaultLocale(Locale.US);
return slr;
}
示例4: sessionLocaleResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
/**
* Session locale resolver.
*
* @return the session locale resolver
*/
@Bean(name = "localeResolver")
public SessionLocaleResolver sessionLocaleResolver() {
SessionLocaleResolver localeResolver = new SessionLocaleResolver();
localeResolver.setDefaultLocale(new Locale("ru"));
return localeResolver;
}
示例5: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
final SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
sessionLocaleResolver.setDefaultLocale(Locale.ENGLISH);
return sessionLocaleResolver;
}
示例6: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
@Override
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
slr.setDefaultLocale(new Locale("pt-BR"));
return slr;
}
示例7: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
LocaleResolver localeResolver(){
SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
sessionLocaleResolver.setDefaultLocale(Locale.US);
return sessionLocaleResolver;
}
示例8: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
slr.setDefaultLocale(Locale.US);
return slr;
}
示例9: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
final SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
sessionLocaleResolver.setDefaultLocale(Locale.US);
return sessionLocaleResolver;
}
示例10: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
slr.setDefaultLocale(new Locale("et"));
return slr;
}
示例11: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
sessionLocaleResolver.setDefaultLocale(Locale.US);
return sessionLocaleResolver;
}
示例12: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localeResolver() {
SessionLocaleResolver slr = new SessionLocaleResolver();
slr.setDefaultLocale(Locale.forLanguageTag("en"));
return slr;
}
示例13: localResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public LocaleResolver localResolver(){
SessionLocaleResolver bean = new SessionLocaleResolver();
bean.setDefaultLocale(Locale.ENGLISH);
return bean;
}
示例14: sessionLocaleResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public SessionLocaleResolver sessionLocaleResolver(){
SessionLocaleResolver localeResolver=new SessionLocaleResolver();
localeResolver.setDefaultLocale(Locale.US);
return localeResolver;
}
示例15: localeResolver
import org.springframework.web.servlet.i18n.SessionLocaleResolver; //導入方法依賴的package包/類
@Bean
public SessionLocaleResolver localeResolver() {
SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
sessionLocaleResolver.setDefaultLocale(Locale.ENGLISH);
return sessionLocaleResolver;
}