use of org.springframework.context.support.ResourceBundleMessageSource in project libresonic by Libresonic.
the class LibresonicThemeSource method createMessageSource.
@Override
protected MessageSource createMessageSource(String basename) {
ResourceBundleMessageSource messageSource = (ResourceBundleMessageSource) super.createMessageSource(basename);
// Create parent theme recursively.
for (Theme theme : settingsService.getAvailableThemes()) {
if (basename.equals(basenamePrefix + theme.getId()) && theme.getParent() != null) {
String parent = basenamePrefix + theme.getParent();
messageSource.setParentMessageSource(createMessageSource(parent));
break;
}
}
return messageSource;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project alf.io by alfio-event.
the class DataSourceConfiguration method messageSource.
@Bean
public MessageSource messageSource() {
ResourceBundleMessageSource source = new ResourceBundleMessageSource();
source.setBasenames("alfio.i18n.public", "alfio.i18n.admin");
// since we have all the english translations in the default file, we don't need
// the fallback to the system locale.
source.setFallbackToSystemLocale(false);
source.setAlwaysUseMessageFormat(true);
return source;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project FP-PSP-SERVER by FundacionParaguaya.
the class WebMvcConfig method messageSource.
@Bean
public MessageSource messageSource() {
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasenames(MESSAGES_PATH);
messageSource.setFallbackToSystemLocale(false);
return messageSource;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project tutorials by eugenp.
the class ClientWebConfig method messageSource.
@Bean
@Description("Spring message resolver")
public MessageSource messageSource() {
final ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("messages");
return messageSource;
}
use of org.springframework.context.support.ResourceBundleMessageSource in project motech by motech.
the class PasswordRecoveryServiceTest method prepareMessageSource.
private void prepareMessageSource() {
messageSource = new ResourceBundleMessageSource();
messageSource.setBasename("messages/messages");
messageSource.setUseCodeAsDefaultMessage(true);
}
Aggregations