2.7.5.  Portlets

The following topics are covered:

2.7.5.1. Standard portlet resource keys
2.7.5.2. Debugging resource bundle usage

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.

  1. Create the file GadgetPortlet_es.properties in: WEB-INF/classes/locale/portlet/gadget/GadgetPortlet.

  2. 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.

Copyright ©2012. All rights reserved. eXo Platform SAS