use of org.springframework.context.support.ResourceBundleMessageSource in project thymeleaf by thymeleaf.
the class SpringWebConfig method messageSource.
/*
* Message externalization/internationalization
*/
@Bean
public ResourceBundleMessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("Messages");
return messageSource;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project thingsboard by thingsboard.
the class ThingsboardMessageConfiguration method messageSource.
@Bean
@Primary
public MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("i18n/messages");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project probate-back-office by hmcts.
the class ApplicationConfiguration method resourceMessageSource.
@Bean
public ResourceBundleMessageSource resourceMessageSource() {
ResourceBundleMessageSource source = new ResourceBundleMessageSource();
source.setBasename("ResourceMessages");
return source;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project SpringMVCSampleProject by ramazansakin.
the class AppConfig method messageSource.
/*public void configureViewResolvers(ViewResolverRegistry registry) {
XmlViewResolver xmlViewResolver = new XmlViewResolver();
xmlViewResolver.setLocation(resourceLoader.getResource("WEB-INF/jasper-views.xml"));
xmlViewResolver.setOrder(0);
registry.viewResolver(xmlViewResolver);
}*/
@Bean
public MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("messages");
return messageSource;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project xm-ms-entity by xm-online.
the class LocaleConfiguration method messageSource.
@Bean
public MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasenames("messages", "i18n/messages");
messageSource.setDefaultEncoding(Charset.forName("UTF-8").name());
messageSource.setFallbackToSystemLocale(true);
messageSource.setCacheSeconds(-1);
messageSource.setAlwaysUseMessageFormat(false);
messageSource.setUseCodeAsDefaultMessage(true);
return messageSource;
}
Aggregations