Java Reference
In-Depth Information
For more information about resource bundles, see
Chapter 9
,
“
Internationalizing and
The resource bundle is configured as follows in the
faces-config.xml
file:
<application>
<resource-bundle>
<base-name>dukesbookstore.web.messages.Messages</base-name>
<var>bundle</var>
</resource-bundle>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>de</supported-locale>
<supported-locale>fr</supported-locale>
<supported-locale>es</supported-locale>
</locale-config>
</application>
This configuration means that in the Facelets pages, messages are retrieved using the pre-
fix
bundle
with the key found in the
Messages_
locale
.properties
file, as in the
following example from the
index.xhtml
page:
<h:outputText style="font-weight:bold"
value="#{bundle.ChooseBook}" />
In
Messages.properties
, the key string is defined as follows:
ChooseBook=Choose a Book from our Catalog
Deployment Descriptors Used in Duke's Bookstore
The following deployment descriptors are used in Duke's Bookstore: