Pages

Monday, August 31, 2009

change default language in custom portlets

our own portlets defaultly doesnt changes the data as per selected language even the database contains the related language stuff. To Get that respective language data we need to use

JournalContentUtil.getContent(groupId, articleId, viewMode, languageId, themeDisplay);

It will returns the Content in String format.
To work with this we need to import base file

<%@ page import="com.liferay.portlet.journalcontent.util.JournalContentUtil" %>

It will be available in portal-service.jar file.

No comments:

Post a Comment