|
Localization and Internationalization |
|
All components have internationalization support to make your application localizable.
To make your application localizable the below steps should be accomplished:
1. Define the default locale and other supported locales in the locale-config element of your application configuration file .
<locale-config>
<default-locale>en</default-locale>
<supported-locale>de</supported-locale>
<supported-locale>fr</supported-locale>
<supported-locale>es</supported-locale>
</locale-config>
2. Create the resource file for each supported locale. It will be usual property files.
resources_en.properties
resources_de.properties
resources_fr.properties
resources_es.properties
3. Define loadBundle tag on JSP page to specify which property file to use. For more information on using loadBundle see JSF documentation.
<f:loadBundle basename="testingapplication.resources" var="res" />
4. On JSP page you can retrieve the property from resource file by using the following syntax:
value="#{res.propertyName}"
You can see the localization example for each component in the testing application demo.