Wednesday, October 12, 2016

How to translate the custom OAF pages

Translation of custom OAF pages.

We can translate the language of a custom OAF page using XLIFF file.

Below is the command to extract the XLIFF File.

java oracle.jrad.tools.trans.extractor.XLIFFExtractor /xx/oracle/apps/po/webui/PoPrintReportPG -languages JA-JP -mmd_dir $OA_HTML/jrad -root $JAVA_TOP/xx/ -xliff_dir $JAVA_TOP/xx/ -source db -username apps -password <apps password> -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<host>)(PORT=<port>))(CONNECT_DATA=(SID=<sid>)))"

The XLIF file will be exported to the specified -xliff dir ($JAVA_TOP/xx/).
Once you get the .xlf file edit the file and add the translations.

         <trans-unit id=".xx.oracle.apps.po.webui.PoPrintReportPG..mainRN...windowTitle" translate="yes" maxbytes="4000" maxwidth="30" size-unit="char">
            <source>Print Report</source>
            <target>帳票出力</target>
            <prop-group name="ora_untranslatable">
               <prop prop-type="tagName">pageLayout</prop>
               <prop prop-type="attributeName">windowTitle</prop>
            </prop-group>
         </trans-unit>

Add the translated text in <target> section.
Move the file to any working directory and run the XLIFF import command.
The XLIFF Importer takes a translated XLIFF file and imports it into the MDS Repository.

Below is the command to import the XLIFF File.

java oracle.jrad.tools.trans.imp.XLIFFImporter $JAVA_TOP/xx/oracle/apps/po/webui/PoPrintReportPG.xlf -username apps -password <apps password> -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=<host>)(Port=<port>))(CONNECT_DATA=(SID=<sid>)))"

7 comments:

  1. thank you for comments, command worked.

    ReplyDelete
  2. I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.
    Spanish Translation Services

    ReplyDelete
  3. Hi ....
    I run the link as you have mentioned ...

    [oracle@DB-ap1 ~]$ java oracle.jrad.tools.trans.extractor.XLIFFExtractor $JAVA_TOP/MyDirpath.../OafPG.xml
    -languages JA-JP -mmd_dir $OA_HTML/jrad -root $JAVA_TOP/MyDirpath.../webui/ -xliff_dir $JAVA_TOP//MyDirpath.../webui/
    -source db -username apps -password -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=))(CONNECT_DATA=(SID=)))"

    (I gave database information in the link above)


    But I get this error....

    Missing resource bundle: oracle.apps.bis.pmf.jrad.UIResourceBundle
    Missing resource bundle: oracle.apps.bis.pmf.jrad.UIResourceBundle
    Missing resource bundle: oracle.apps.bis.pmf.jrad.UIResourceBundle
    Error: "$JAVA_TOP/MyDirpath.../webui/OafPG.xml" not found in repository.

    I did run BEGIN
    jdr_utils.printDocument('/oracle/apps/xxsr_sv/abo/webui/SRICHIAboUpdatePG');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(SQLERRM);
    END;

    to check if the file is in the MDS Repository... And it does show me the contents of this xml file....

    I am completely lost, as to why I am getting this error.

    Can you please let me know.

    Thanks!

    ReplyDelete
    Replies
    1. Hi,
      The directory is not valid.
      $JAVA_TOP//MyDirpath.../webui/

      The directory should exist. The correct directory could be
      $JAVA_TOP/MyDirPath/webui

      check if directory exists by running

      $ls -ll $JAVA_TOP/MyDirPath/webui

      Delete
  4. Hi, I'm getting junk character in the vi editor, but the same are not there in notepad ++. as show below.
    when I tried to import the xlf file it is giving me error, can anyone suggest.

    IO Exception : java.io.UTFDataFormatException: Invalid UTF8 encoding.

    sample of my xlf file.

    Put a Value less than 100
    ضغ �ٍكة أ�ف كل 100

    sortableHeader
    shortDesc

    ReplyDelete
  5. why is the xlf file opened in unix is giving me junk characters, but when opened in notepad ++ , it is looking fine. also I used the above importer command , but nothing is showing in the page when language preference is Arabic, is any problem with language configuration.

    in notepad ++
    -------------

    Sequence No
    رقم التسلسل

    sortableHeader
    prompt



    in unix
    --------

    Sequence No
    ر�ك افتسفسف

    sortableHeader
    prompt


    ReplyDelete
  6. It’s actually a great and helpful piece of info. I’m happy that you just shared this helpful info with us. Please keep us informed like this. Thanks for sharing! Best Romanian Translation Services service provider.

    ReplyDelete