Can I use messages.yml
in place of messages.properties
to define internationalization of messages.
I tried it, it doesn't work, can anyone help what else needs to be done?
My resolver looks like this
@Bean
public ResourceBundleMessageSource messageSource() {
ResourceBundleMessageSource rs = new ResourceBundleMessageSource();
rs.setBasename("i18n/messages");
rs.setDefaultEncoding("UTF-8");
rs.setUseCodeAsDefaultMessage(true);
return rs;
}
I have put messages.yml
under resources/i18n/
.
Currently its not supported by default as you can see from this feature request which has been closed due to be realtively unrelevant: https://github.com/spring-projects/spring-framework/issues/18990
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With