Sunday, March 23, 2014

How to support multiple languages for Portlet category in Liferay

As a CMS, Liferay allows us to deploy our custom portlet, and also define category for the custom portlet.

We can actually define category for all my custom portlets. eg, My Category Name.
Besides, we also can make the custom category name to support multi-languages with resource bundle.


1. In liferay-display.xml, and navigate to the target category section.
<category name="My Category Name">
    <portlet id="myPortlet1" />
    <portlet id="myPortlet2" />

2. create the bundle key in Category Name

3. replace the name attribute with bundle key in <category /> tag as below.
<category name="">
    <portlet id="myPortlet1" />
    <portlet id="myPortlet2" />


No comments:

Post a Comment


Related Posts Plugin for WordPress, Blogger...