Implement Internationalization and Localization in JSF

Internationalization and Localization are important features for an web based application. Internationalization is implementing the features in your application to support multiple languages. Localization is creating text in a specific language that is presented through an internationalized application

also read:

The following example program demonstrates very simple program for implementing this concepts. if you look into the faces-config.xml file,locale-config element is used for specifying the default locale and supported locale information. In this sample application we have provided default as English and supported as French.

Use resource-bundle element to specify the name of the properties file to be used. For example if you create a resource bundle name as Messages, then all the language letters will be suffixed with the file name.In our case French locale is named as “Messages_fr”.The default will be “en”, it is not required to specify explicitly.

<%@taglib prefix="f" uri=""%>
<%@taglib prefix="h" uri=""%>
                <h:commandButton value="#{msg.cancel}" action="fail"/>
                <h:commandButton value="#{msg.submit}" action="success"/>


<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="1.2"



Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This

Share this post with your friends!