Reputation: 486
How can I make internationalization using jstl? I've read a lot about fmt: taglib but I still don't get how to use it. For example, we have line
<p><a href="${StackOverFlow}" title='<liferay-ui:message key="hello-world" />'>Stack_over_flow</a></p>
And the Language.properties in the docroot/src/content folder. How can I use JSTL in the title section?
I read a lot about this issue but had no effect. @Shivam
Upvotes: 0
Views: 219
Reputation: 486
As usual, the answer was too easy:
<c:set var="message">
<liferay-ui:message key="hello-world" />
</c:set>
<p><a href="${StackOverFlow}"title="${message}">Stack_over_flow</a></p>
It was all about avoiding "tag in tag in tag in tag" construction.
Upvotes: 0
Reputation: 805
I suppose you are looking for this <fmt:message key="hello-world">
Do not forget to include the taglib <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
Upvotes: 1