在 thymeleaf 表达式中使用语言环境文件中的值
Use value from locale file in thymeleaf expression
有什么方法可以让 Thymeleaf
解释常规 Thymeleaf
表达式中的语言环境选择器?
例如:
th:text="${userMsgRating.error ? #{rating_error} : #{rating_thanks}}"
使用
让它工作
th:text="${userMsgRating.error ? '__#{rating_error}__' : '__#{rating_thanks}__'}"
更多信息:http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#preprocessing
有什么方法可以让 Thymeleaf
解释常规 Thymeleaf
表达式中的语言环境选择器?
例如:
th:text="${userMsgRating.error ? #{rating_error} : #{rating_thanks}}"
使用
让它工作th:text="${userMsgRating.error ? '__#{rating_error}__' : '__#{rating_thanks}__'}"
更多信息:http://www.thymeleaf.org/doc/tutorials/2.1/usingthymeleaf.html#preprocessing