Details
-
New Feature
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Developers can use a standard feature of the WEB-INF/portlet.xml descriptor to register an internationalized resource-bundle. For example:
src/main/webapp/WEB-INF/portlet.xml
<?xml version="1.0"?> <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"> <portlet> ... <resource-bundle>Language</resource-bundle> ... </portlet> </portlet-app>
Messages are stored in resource bundles (property files) like the following:
src/main/resources/Language.properties
hello-world=Hello World
This issue serves as a task for adding a feature to the i18n EL keyword to lookup internationalized messages from such a file. For example:
src/main/webapp/WEB-INF/views/view.xhtml
<h:outputText value="#{i18n['hello-world']} />