Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Upgrade LanguageUtil.get method
Good afternoon, I am new to liferay and I am trying to migrate the code of a portlet from 6.2 to 7.4, I need to know how to use the LanguageUtil.get() method in liferay 7.x, currently it is implemented like this in my JSP LanguageUtil.get(pageContext, "key"), but I get an error "PortletConfig get/format methods" I have tried some ways like LanguageUtil.get(themeDisplay.getLocale(), "key") but I can't get the error to go away, any suggestion or correct way is appreciated to do it.
<p class="customFormInfo"><%=LanguageUtil.get(themeDisplay.getLocale(), "complaints.info.1")%></p>
Hi Jorge,
I think it will be easier to use the ui taglib as stated here.
JSP example:
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
...
<liferay-ui:message key="howdy-partner" />
...
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™