The following topics are covered:
Portlets are independent applications and deliver their own resource files.
All shipped portlet resources are located in the locale/portlet subfolder. The ResourceBundleService parameter classpath.resources defines this subfolder.
Procedure 2.1. Example
To add a Spanish translation to the GadgetPortlet.
Create the file GadgetPortlet_es.properties in: WEB-INF/classes/locale/portlet/gadget/GadgetPortlet.
In portlet.xml, add Spanish as a supported-locale ('es' is the 2 letters code for Spanish), the resource-bundle is already declared and is the same for all languages:
<supported-locale>en</supported-locale>
<supported-locale>es</supported-locale>
<resource-bundle>locale.portlet.gadget.GadgetPortlet</resource-bundle>
See the portlet specification for more details about the portlet internationalization.