Translating Personalizations Stored in MDS

If you personalize pages that reside in the MDS Repository, you can perform bulk translations of the personalizations using the following steps, which employ the OA Extension Translation toolset:

  1. You must initially create MDS Personalizations in the base language of your Oracle E-Business Suite installation before you can translate the text portion of the personalizations to other languages. System Administrators who create the personalizations should first set their Language Preference to the base language specified in FND_LANGUAGES.

  2. Go to the APPL_TOP directory and source the file APPSORA.env to set all your environment variables. For Windows, refer to the Oracle E-Business Suite Maintenance Procedures to display an appropriate command prompt window and use the resulting command prompt window to set your environment variables (run %APPL_TOP%\envshell.cmd).

  3. Determine the location of the personalization document to translate. You can determine the path of the MDS personalization document you wish to export/extract by using the following rules:

    You can also use SQL*Plus to review all the personalizations for a given base document. JDR_UTILS is a PL/SQL package that allows you to evaluate the list of personalization documents that are in your MDS repository. Included in this package is a procedure called jdr_utils.listcustomizations(''); which allows you to see the personalization document path names that are currently defined in MDS. To run this procedure, launch Sql*Plus, set serveroutput on, and execute the jdr_utils.listcustomizations(''); command. Replace the '' reference with an actual base document reference. For example, to see all the personalization documents for the Notifications Worklist Table, execute the following command:

    exec jdr_utils.listcustomizations('/oracle/apps/fnd/wf/
      worklist/webui/AdvancWorklistRG');
    

    If you run the example above, you may notice function personalization document references that you did not create. These are Oracle-seeded function-level personalizations created by the Oracle E-Business Suite development teams. Personalization definitions are seeded by development teams so that they can share components across products and vary their look and behavior slightly with each use.

    For more information about JDR_UTILS, refer to the Inspecting the MDS Repository Content section in the Testing and Debugging chapter of the Oracle Application Framework Developer's Guide.

  4. Determine the list of required translations by using the following SELECT statement:

    select language_code, nls_language from fnd_languages 
      where installed_flag in ('I', 'B'); 
    

    For every language retrieved that needs translations, you will need to specify that language for the -languages option when you run the XLIFF Extractor in the next step. Specify the languages for the -languages option as the language-territory code using the format xx-YY, where xx is the two character language code, in lower case, and YY is the two character territory code in upper case.

    Additional Information: If the last two characters of the language-territory code are not in upper case, the XLIFF Importer automatically converts them to upper case and logs a warning.

    The following mapping was used when migrating translations from AK format to OA Extension format, to map the Oracle E-Business Suite language code to the xx-YY format.

  5. Use the XLIFF Extractor tool directly against the MDS DB repository to export and extract the base language personalized content into an XLIFF file (.xlf) in one step. (Note that earlier versions of the XLIFF Extractor were only able to extract language content from .xml files and as a result, you had to first export the personalizations into .xml files using the Export tool, then use the XLIFF Extractor tool to extract the base language content from the Xml to an XLIFF file.)

    The XLIFF formatted file contains information regarding the translatable personalization properties and is the document that you physically translate into your installed languages. You can send out large volumes of translation content to a 3rd party translator, if necessary, using this mechanism.

    Insert into the path of the original document you personalized, the personalization level and level value mapping information determined in Step 3 to derive the fullPathOfFileName_or_directoryname for the following command:

    Java oracle.jrad.tools.trans.extractor.XLIFFExtractor <fullPathOfFileName_or_directoryname>
       -username <MDS repository username>
       -password <MDS repository password>
       -dbconnection <database connection string in TNSNAMES format>
       -root <root directory, where all the MDS documents (Xml files) can be found or be saved to>
       -source db
       -languages <List of comma separated target languages 
       for which the XLIFF documents are to be created.>
       -mmd_dir <directory location of the MMD files to use>
       -xliff_dir <source directory for XLIFF files. This is where your XLIFF files 
       will be created or expected by the XLIFF Importer.>
    
    Example

    The following example first exports the base language site level personalizations of the Advanced Worklist table document /oracle/apps/fnd/wf/worklist/webui/customizations/site/0/AdvancWorklistRG and saves the content to a Xml document in the root directory $APPL_TOP/admin/patch. It then extracts the translatable information from the Xml document and saves it to two .xlf files with the target language set for each file as "fr-FR" or "ja-JP". The two .xlf files are saved under two new subdirectories named for the respective languages specified, beneath the directory specified by the -xliff_dir option.

    Additional Information: You can place the documents under any root directory you wish using the -root parameter. These examples use $APPL_TOP/admin/patch for convenience.

    Java oracle.jrad.tools.trans.extractor.XLIFFExtractor /oracle/apps/
      fnd/wf/worklist/webui/customizations/site/0/AdvancWorklistRG 
      -rootdir $APPL_TOP/admin/patch -username APPSNAME 
      -password APPSPWD -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
      (HOST=yourhost)(PORT=yourport))(CONNECT_DATA=(SID=yoursid)))"
      -source db -languages Fr-FR,ja-JP -mmd_dir $OA_HTML/jrad 
      -xliff_dir $APPL_TOP/admin/patch/oracle/apps/fnd/wf/
        worklist/webui/customizations/site/0/
    

    The preceding example exports and extracts the translatable information for

    /oracle/apps/fnd/wf/worklist/webui/
      customizations/site/0/AdvancWorklistRG
    

    to

    $APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/
      customizations/site/0/Fr-FR/AdvancWorklistRG.xlf
    
    
    $APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/
      customizations/site/0/JA-JP/AdvancWorklistRG.xlf
    

    Additional Information: The XLIFF files should be UTF-8 encoded so that the translated strings are imported correctly and subsequently used correctly during runtime.

  6. From this point on, the copies of the base XLIFF files are referred to as the language XLIFF files and you will be updating these language XLIFF files with the appropriate language translations.

    An Example Language XLIFF File
    <?xml version = '1.0' encoding = 'UTF-8'?> 
    <xliff version="1.0"> 
      <file datatype="jdr" original="PayTermsLOVRN" 
        product-version="$Header: PayTermsLOVRN.xlf 115.1 
        2003/02/26 19:58:26 jfrost noship $" source-language=
        "en-US" target-language="Fr-FR" product-name="qp"> 
          <body> 
             <trans-unit id=".oracle.apps.qp.lov.webui.
               PayTermsLOVRN..PTName...prompt" translate="yes" 
               maxbytes="4000" maxwidth="26" size-unit="char"> 
                <source>Payment Terms</source> 
                <target>Payment Terms</target> 
                <prop-group name="ora_untranslatable"> 
                   <prop prop-type="tagName">messageStyledText
                     </prop> 
                   <prop prop-type="attributeName">prompt</prop> 
                </prop-group> 
             </trans-unit> 
             <trans-unit id=".oracle.apps.qp.lov.webui.
               PayTermsLOVRN..TermId...prompt" translate="yes" 
               maxbytes="4000" maxwidth="14" size-unit="char"> 
                <source>Term Id</source> 
                <target>Term Id</target> 
                <prop-group name="ora_untranslatable"> 
                   <prop prop-type="tagName">formValue</prop> 
                   <prop prop-type="attributeName">prompt</prop> 
                </prop-group> 
             </trans-unit> 
          </body> 
       </file> 
    </xliff>
  7. For each language XLIFF file, there is a <trans-unit> element in the XLIFF file for every translatable component extracted from the XML file. The <source> element in each <trans-unit> contains the translatable string specified in the source language. The <target> element represents the same string translated to the target language. Update the string in the <target> element for each <trans-unit> element you want to translate.

  8. Once you complete the translation of each language XLIFF file, use the XLIFF Importer to import the translations into the MDS repository.

    Example

    The following example imports the translated XLIFF file

     $APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/
       customizations/site/0/Fr-FR/AdvancWorklistRG.xlf

    to the MDS repository:

    Java oracle.jrad.tools.trans.imp.XLIFFImporter 
      -username APPSNAME 
      -password APPSPWD 
      -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
        (HOST=yourserver)(PORT=yourport))(CONNECT_DATA=
        (SID=yoursid)))"
      $APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/
        customizations/site/0/Fr-FR/AdvancWorklistRG.xlf