Reputation: 2170
Given the following MVC3 i18n use:
at a jsp file:
<s:message code="clickHere">
at message.properties file:
clickHere=Please click <a href="http://abc.com">Here</a>
a user's browser will display(and the word Here will be a link to http://abc.com
):
Please click Here
Thanks
Upvotes: 1
Views: 2855
Reputation: 19944
In any case you use Thymeleaf, instead of th:text
, you should use the th:utext
.
Example below:
# Instead of this
<div th:text="#{message}">text to be replaced</div>
# Use this
<div th:utext="#{message}">text to be replaced</div>
You should always keep in mind that using the th:utext
can cause XSS Attacks.
In the properties file, you will obviously have the following,
# In properties
message=Text to be displayed
Upvotes: 0