Java Code Examples for org.springframework.web.servlet.i18n.SessionLocaleResolver#setDefaultLocale()
The following examples show how to use
org.springframework.web.servlet.i18n.SessionLocaleResolver#setDefaultLocale() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocaleConfig.java From SuperBoot with MIT License | 5 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); // 默认语言 slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); return slr; }
Example 2
Source File: AppConfig.java From spring-boot-ddd with GNU General Public License v3.0 | 5 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); Locale ptBr = new Locale("pt", "BR"); slr.setDefaultLocale(ptBr); return slr; }
Example 3
Source File: WebConfig.java From auth-server with Apache License 2.0 | 5 votes |
/** * <p> * Resolver for localizations. * </p> */ @Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); slr.setDefaultLocale(Locale.US); return slr; }
Example 4
Source File: I18nConfig.java From LuckyFrameWeb with GNU Affero General Public License v3.0 | 5 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); // 默认语言 slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); return slr; }
Example 5
Source File: WebMvcAutoConfiguration.java From blog-sharon with Apache License 2.0 | 5 votes |
/** * 国际化设置 * * @return LocaleResolver */ @Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); slr.setDefaultLocale(Locale.CHINA); return slr; }
Example 6
Source File: I18nConfig.java From springboot-learn with MIT License | 5 votes |
/** * Session方式 * * @return */ @Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); //设置默认区域 slr.setDefaultLocale(Locale.US); return slr; }
Example 7
Source File: I18nConfig.java From supplierShop with MIT License | 5 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); // 默认语言 slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); return slr; }
Example 8
Source File: I18nConfig.java From fw-spring-cloud with Apache License 2.0 | 5 votes |
/** * session区域解析器 * @return */ @Bean public LocaleResolver localeResolver() { SessionLocaleResolver resolver = new SessionLocaleResolver(); resolver.setDefaultLocale(Locale.CHINA); return resolver; }
Example 9
Source File: I18nConfig.java From ruoyiplus with MIT License | 5 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); // 默认语言 slr.setDefaultLocale(Locale.SIMPLIFIED_CHINESE); return slr; }
Example 10
Source File: WebMvcAutoConfiguration.java From stone with GNU General Public License v3.0 | 5 votes |
/** * 国际化设置 * * @return LocaleResolver */ @Bean public LocaleResolver localeResolver() { final SessionLocaleResolver slr = new SessionLocaleResolver(); slr.setDefaultLocale(Locale.CHINA); return slr; }
Example 11
Source File: I18nConfig.java From open-capacity-platform with Apache License 2.0 | 5 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(Locale.CHINA); return sessionLocaleResolver; }
Example 12
Source File: Application.java From Mastering-Spring-5.1 with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(Locale.US); return sessionLocaleResolver; }
Example 13
Source File: SpringSecurityApplication.java From Mastering-Spring-5.1 with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(Locale.US); return sessionLocaleResolver; }
Example 14
Source File: Application.java From Mastering-Spring-5.1 with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(Locale.US); return sessionLocaleResolver; }
Example 15
Source File: Application.java From Mastering-Spring-5.0 with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(Locale.US); return sessionLocaleResolver; }
Example 16
Source File: MvcConfig.java From fredbet with Creative Commons Attribution Share Alike 4.0 International | 4 votes |
@Bean public LocaleResolver localeResolver(FredbetProperties fredbetProperties) { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(fredbetProperties.getDefaultLocale()); return sessionLocaleResolver; }
Example 17
Source File: MvcConfig.java From tutorials with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); slr.setDefaultLocale(Locale.US); return slr; }
Example 18
Source File: WebConfig.java From Microservices-with-Spring-Cloud with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); slr.setDefaultLocale(Locale.GERMANY); return slr; }
Example 19
Source File: Application.java From Mastering-Spring-5.0 with MIT License | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver(); sessionLocaleResolver.setDefaultLocale(Locale.US); return sessionLocaleResolver; }
Example 20
Source File: MvcConfig.java From SENS with GNU General Public License v3.0 | 4 votes |
@Bean public LocaleResolver localeResolver() { SessionLocaleResolver slr = new SessionLocaleResolver(); slr.setDefaultLocale(Locale.CHINA); return slr; }