我想使用 thymeleaf 模板引擎显示属性文件中的文本

I want to display a text as it is in the properties file with thymeleaf template engine

我有2个文件 message_ar.properties 和 messages_fr.properties 国际化

在我的 html 文件中,我想显示正确的确认消息标签

我正在使用 thymeleaf 作为模板引擎

    <a th:onclick="return confirm('#{label.deleteEmployee}')"

浏览器显示 html 文件中的确认消息!!

我想显示属性文件中的确认消息!

我做的不一样:

<a th:if="#{direction}== 'rtl'" th:onclick="return confirm('هل نريد الحذف فعلا؟')" ...
<a th:unless="#{direction}== 'rtl'" th:onclick="return confirm('Voulez vous vraiment supprimer cet employé?')"...