Group Discounts available for 3+ students and Corporate Clients

steps to provide I18N Support in JSF Application

steps to provide I18N Support in JSF Application

 

  • Prepare properties files for each and every locale

To prepare properties files, we have to use the following naming convections for the properties file

<base-name>-<long>.properties

In the properties files, we have to provide locale respective messages in the form of key-value pairs, where keys should be in English and values should be in locale language

EX: abe-en. properties:-

Income = user name

Upwd= password

 

abc-it. properties

u name- user name

Upwd= password

  • Configure locale and properties file in faces configuration file

To configure locale and properties files in faces configuration file, we have to use the following tags

<faces-config>

<application>

<locale-config>

<default-locale>en</default-locale>

<supported-locale>it</ supported -locale>

</locale-config>

<resource-bundle>

<base-name>abe</base-name>

<var>msg</ var >

</resource-bundle>

</application>

———-

</faces-config>

  1. Access the message from properties file

To access the messages from properties file, we have to use the following <hi output text>gag

<h:output text value=”#{msg. uname}”/>

<h:output text value=”#{msg. upwd}”/>

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on steps to provide I18N Support in JSF Application"

    Leave a Message

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

    Support


    Please Enter Your Details and Query.
    Three + 6