Internationalization
Overview

Internationzalization is a very important aspect in software devellopement today. jPortlet provide an infrastructure for building multi-language/locale portlets:

  • getText() in PortletContext or PortletAdapter returns the string for the given key from the portlet's resource bundle. The portlet's resource bundle must have the same name than the portlet (including the package).
    For example, the portlet com.foo.XPortlet may have the following files as resource bundles inside the portlet's classpath:
    • com/foo/XPortlet.properties (default resource bundle)
    • com/foo/XPortlet_fr.properties (french resource bundle)
    • com/foo/XPortlet_fr_CA.properties (french canadian resource bundle)
    • etc.
  • include() in PortletContext or PortletAdapter allow to include localized resources. You can get more details here