Relative Content

Tag Archive for thymeleafhttp-accept-languagespring-internationalization

Thymeleaf only using default language for sending emails

I am trying to internationalise my application, which is supposed to send emails in different languages. I created messages.properties files for all the languages and default (messages_en.properties, messages_de.properties, messages.properties…). I put them under “/resources” along with the templates using the keys inside of these .properties files.
I also created a configuration class for the MessageSource and injected it into my service class sending the emails: