steps to provide I18N Support in JSF Application
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
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>
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}”/>
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.