How to add new locale to GateIn?

Version 5

    In this Article I want to describe my activities on add new locale to GateIn,

    I add Persian Locale to it.

     

    My way base on GateIn References Guide that places in jBoss Directory;(Internationalization Configure)

     

     

     

    Locales configuration

     


     

     

     

    for first we must add this line at the end of file (02portal.war:/WEB-INF/conf/common/locales-config.xml)

     

    <locale-config>
        <locale>fa</locale>
        <output-encoding>UTF-8</output-encoding>
        <input-encoding>UTF-8</input-encoding>
        <description>Default configuration for the Persian locale</description>
    <orientation>rt</orientation>
     </locale-config>
    

     

    ResourceBundleService

     



     

     

     

    The main ResourceBundleService files listed in this configure file that if you want to add new package to your Portal you can change and add new file to it;(02portal.war:/WEB-INF/conf/common/common-configuration.xml)

     

    Navigation Resource Bundles

     



     

     

     

    The properties for a group must be in the WEB-INF/classes/locale/navigation/ {group | user | portal} / folder;

     

    content of executive-board_fa.properties:

     

     

    organization.title=سازمان
    organization.newstaff=کارمند جدید
    organization.management=مدیریت
    

     

     

    Portlets



     

    All shipped portlet resources are located in the locale/portlet subfolder;

     

    1. Create {porlet_name}_fa.properties
    2. In portlet.xml add this lines:
       <supported-locale>fa</supported-locale>
       <resource-bundle>locale.portlet.{portlet_name}</resource-bundle>