Question

How to localize the elements of CCP?

Answer

  1. In the OA Provider CP, go to System > Settings > Locales.
  2. Choose the locale you would like to modify.
  3. Switch to the Source Locale Files tab.
  4. Locate the XML file that contains the phrase you would like to modify and download it on the local machine.
  5. Locate the required phrase and its keyword in the downloaded XML file. For example:

    <?xml version="1.0"?>
     <locale code="en_US"> 
      <section> 
       <name>PACI-PanelBundle.properties</name>
        <data>
        ...
         <entry>
          <keyword>ADD_NEW_C2USRV.CAPTION</keyword>
          <phrase>New Server</phrase>
         </entry>
        ...
       </data>
      </section>
     </locale>
    
  6. Create a new XML file that will only contain the keyword and modified phrase. For example:

    <?xml version="1.0"?>
     <locale code="en_US"> 
      <section> 
       <name>PACI-PanelBundle.properties</name>
       <data> 
        <entry>
         <keyword>ADD_NEW_C2USRV.CAPTION</keyword>
         <phrase>Create new server</phrase>
        </entry>
       </data>
      </section>
     </locale>
    
  7. Save the XML file with the customized phrase and upload it at the Customized Locale Files tab in the OA Provider CP.
  8. Clear the browser's cache, re-log into the Control Panel, and check that the new phrase appears.

Notes:

  1. There is no need to include any non-customized phrases in the customized XML files. Instead, just leave the keywords and phrases of the strings you want to customize.
  2. If you are customizing OA 5.4 or an earlier version, use UTF-8 XML files without BOM (byte order mark) characters.
  3. The locale files are represented by XML files located in /usr/local/pem/ui/pem/resources/<locale>/lp on OA UI server. The customizations are located in /usr/local/pem/ui/pem/resources-customization/<locale>/lp

How to find the name of the "keyword" that should be translated if you do not know it:

For example, you want to translate the phrase "Create domain and create web hosting on it to be able to install application", but do not know which keyword corresponds to this phrase, or in which localization file and section it is defined:

To find this information:

  • Log into the OA user interface (UI) server using SSH
  • Execute the following commands:

    # cd /usr/local/pem/ui/pem/resources/en_US/lp/
    # grep -i -A1 "Create domain and create web hosting on it to be able to install application" ./*.xml
    ./Web.xml-              <keyword>WA_WIZARD.NO_DSS.DESCRIPTION</keyword>
    ./Web.xml:              <phrase>Create domain and create web hosting on it to be able to install application</phrase>
    

    The keyword you need to translate is WA_WIZARD.NO_DSS.DESCRIPTION.

Additional Information: OA 7 Localization Guide

Internal content