目前,我試圖用message_en.properties文件替換按鈕標籤中的Save
這個詞。如何使用從i18n的Thymeleaf給按鈕標籤
<input type="submit" value="Save" class="btn btn-primary btn-block"/>
我已經試過如下:
<input type="submit" th:text="#{newuser.page.saveBtn}" class="btn btn-primary btn-block"/>
但它不給,結果我的預期。請幫我解決問題。
你有配置messageSource嗎? –
是的,一切工作正常,除了保存按鈕上的標籤 – user7244716