How to give button label using Thymeleaf from i18n

html, internationalization, java, spring-boot, thymeleaf

Solution

Shouldn't it be like this?

<input type="submit"
    th:value="#{newuser.page.saveBtn}"
    class="btn btn-primary btn-block"/>

Problem

Currently I am trying to replace the word `Save` from button label with a value from message_en.properties file. ``` <input type="submit" value="Save" class="btn btn-primary btn-block"/> ``` I have tried as below: ``` <input type="submit" th:text="#{newuser.page.saveBtn}" class="btn btn-primary btn-block"/> ``` But it's not giving the result I expected. Please help me out to solve the issue.

Original source