【发布时间】:2021-10-07 11:32:24
【问题描述】:
所以我正在尝试创建另一个可以在 Thymeleaf 中使用的 .property 文件(称为 labels.properties),如下所示:
<div th:text=#{property.from.labels}></div>
现在我只是在资源文件夹的根目录中添加标签.properties,现在它不起作用。这样做的目的是我想将处理错误消息的属性文件与标签和按钮的文本分开。
- 这可能吗?
- 如果是,怎么做?
- 如果再次是,我可以像添加labels_ja.properties(日语)那样进行国际化吗?
【问题讨论】:
-
我认为你需要 i18n 来达到这个目的,检查一下:baeldung.com/spring-boot-internationalization
标签: spring-boot internationalization thymeleaf properties-file