I am trying internacionalize the views of my current spring-boot / thymeleaf project. So far i did this:
in the html files, i change the references to the texts to this:
h2 th:text="#{about.title}"
i add this line to my
application.propertiesfile:spring.messages.basename=i18n/messages
put the files
*.properties(named with the same name of the html files for the default locale and and the suffix _pt_BR for portuguese locale in the folder/src/main/resources/templates/i18n/messagesof my project.
but when i run the project and open it in the browser, instead of being displayed the correct message, i see things like> ??about.title??.
What i am doing wrong here?
message.propertiesin the directory/src/main/resources(and removing the linespring.messages.basename=i18n/messagesfrom theapplication.properties. but now I am getting a problem with localized messages like that:logo.welcome=Welcome, <a th:href="@{/login}">log in</a> or <a th:href="@{/account}">register</a>(with the@{...}variable). - Kleber Mota