Reputation: 688
I have my Entity with a title that is localized.
<?xml version='1.0' encoding='UTF-8'?><root available-locales="en_GB,fr_FR," default-locale="en_GB"><Title language-id="fr_FR">Test FR</Title><Title language-id="en_GB">TEST GB</Title></root>
How can i do to dispay it with my current language ?
<c:forEach var="service" items="${listServices}">
<td>${service.title}</td>
</c:forEach>
Thanks !
Upvotes: 1
Views: 194
Reputation: 2257
look at com.liferay.portal.kernel.util.LocalizationUtil
class to have all methods for this xml managment.
In particolar you need getLocalization(String xml, String requestedLanguageId, boolean useDefault)
to extract the localized text.
bye
Upvotes: 2