Just two days ago to study this problem, share ah.
Title:
The implementation of multi-language in Oaf
Overview:
OAF's multi-language implementation has two ways, one is directly through the page above the "personalization" connection, connected to the specified page after the settings;
The second is to implement multi-language by uploading the specified XLF file, and the next discussion is the implementation method.
Realize:
1, find the need to implement a multi-language XML page, (if the page is developed locally, then directly from the local,
If the standard page is on top of the server, use the Export tool class to download it from MDS first. )
With a text editor, open the file and confirm that the file encoding = ' UTF-8 ' xml:lang= "en-US"
The code for the starting part of the page XML file is as follows:
<?xml Version = ' 1.0 ' encoding = ' UTF-8 '?>
<!--dbdrv:exec Java oracle/jrad/tools/xml/importer xmlimporter.class java &phase=dat+24 checkfile:~prod:~path : ~file &fullpath:~prod:~path:~file-username &un_apps-password &pw_apps-dbconnection &jdbc_db_addr- UserId "1"-rootpackage/oracle/apps/~prod-rootdir &fullpath:~prod:mds:directory--
<page xmlns:jrad= "Http://xmlns.oracle.com/jrad" xmlns:oa= "Http://xmlns.oracle.com/oa" xmlns:ui= "http// Xmlns.oracle.com/uix/ui "version=" 9.0.3.8.12_1330 "xml:lang=" en-US "xmlns:user=" Http://xmlns.oracle.com/jrad/user "Xmlns=" Http://xmlns.oracle.com/jrad "file-version=" $Header $ ">
<content>
<oa:pagelayout id= "pagelayoutrn" windowtitle= "not Natsumi Sato report screen" title= "not Natsumi Sato report" Amdefname= "Hitachi_ Densa.oracle.apps.xxfm.fm013.server.XxfmNotImplementReportAM "controllerclass=" Hitachi_ Densa.oracle.apps.xxfm.fm013.webui.XxfmNotImplementReportCO "function=" XXFMNOTIMPLEMENTREPORTPG1 "use="/hitachi_ Densa/oracle/apps/xxfm/attributesets/xxfmnotimplementreport1/pagelayout ">
</content>
</page>
2. Use the Xliffextractor tool class to generate the corresponding XLF files based on the XML file.
2.1. Create a new Xliffextractoutline.bat file under the%jdev_install_dir%\jdevbin\jdev\bin directory
2.2. In the new BAT file, enter the following code
The Set Classpath=%jdev_install_dir%\jdevbin\jdev\lib\xml_import.jar
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor%JDEV_USER_HOME%\MYPROJECTS\HITACHI_DENSA\ORACLE\APPS\XXFM \fm013\webui\xxfmnotimplementreportpg.xml-mmd_dir%jdev_user_home%\myhtml\oa_html\jrad-root%JDEV_USER_HOME%\ Myprojects-xliff_dir f:\xliff-languages JA-JP "
Set Classpath=%jdev_install_dir%\jdevbin\jdev\lib\xml_import.jar: Define environment variables Classpath
The class in Java Oracle.jrad.tools.trans.extractor.XLIFFExtractor:xml_import.jar
%jdev_user_home%\myprojects\hitachi_densa\oracle\apps\xxfm\fm013\webui\ Xxfmnotimplementreportpg.xml: To implement XML pages in multiple languages
-mmd_dir%jdev_user_home%\myhtml\oa_html\jrad: The configuration file directory to which you want to refer
-root%jdev_user_home%\myprojects: Defines the directory structure of the generated XLF files (the specified directory structure after root will not be included in the Xlf file)
-xliff_dir F:\xliff: Where to place the good XLF files
-languages JA-JP: The target language needs to be generated because the original page XML file xml:lang= "en-us", so the output language needs to be set to JA-JP
Wakahara the xml:lang= "JA-JP" in the page XML file, you will need to set the output language to en-us
installation directory for%jdev_install_dir%:jdeveloper
%jdev_user_home%: Directory of project files
3, in the DOS command run Xliffextractoutline.bat, so, generated the F:\xliff\ja-JP\XxfmNotImplementReportPG.xlf file
The code for the start part of the Xxfmnotimplementreportpg.xlf file is as follows:
<?xml Version = ' 1.0 ' encoding = ' UTF-8 '?>
<!--dbdrv:--
<xliff version= "1.0" >
<file datatype= "JDR" original= "XXFMNOTIMPLEMENTREPORTPG" product-version= "$Header $" source-language= "en-US" Target-language= "JA-JP" >
<body>
<trans-unit id= ". Hitachi_densa.oracle.apps.xxfm.fm013.webui.XxfmNotImplementReportPG. Pagelayoutrn...windowtitle "translate=" yes "maxbytes=" 4000 "maxwidth=" "size-unit=" char ">
<source> no Natsumi Sato report screen </source>
<target> no Natsumi Sato report screen </target>
<prop-group name= "Ora_untranslatable" >
<prop prop-type= "TagName" >pageLayout</prop>
<prop prop-type= "AttributeName" >windowTitle</prop>
</prop-group>
</trans-unit>
...
Where special attention is required:
One, encoding = ' UTF-8 '
Second, source-language= "en-US" target-language= "JA-JP"
Third, <trans-unit id= ". Hitachi_densa.oracle.apps.xxfm.fm013.webui.XxfmNotImplementReportPG.
Iv. <source> Natsumi Sato report screen </source> <target> Natsumi Sato Report Screen </target>
4, in the above 4th,<source> tag is the original page XML file in the text,<target> tag is what you want to change the target text displayed
<target> Non-Natsumi Sato report screen </target> modified to <target> Natsumi Sato report screen Japan ページ</target>
5. Use the Xliffimporter tool class to upload the XLF files.
2.1. Create a new Xliffimportoutline.bat file under the%jdev_install_dir%\jdevbin\jdev\bin directory
2.2. In the new BAT file, enter the following code
The Set Classpath=%jdev_install_dir%\jdevbin\jdev\lib\xml_import.jar
Java oracle.jrad.tools.trans.imp.XLIFFImporter F:\xliff\ja-JP\XxfmNotImplementReportPG.xlf-username Apps-password Fmst1apps-dbconnection "" (DESCRIPTION = (Address_list = (ADDRESS = (COMMUNITY = tcp.world) (PROTOCOL = tcp) (Host = 192.168 .10.245) (Port = 1526))) (Connect_data = (SID = test05)) "" "
6. Run Xliffimportoutline.bat in DOS command, that is, upload the XLF files to the specified directory.
7, restart Apache, if using English environment landing, then the corresponding part of the page shows "no Natsumi Sato report screen"; If you log in in Japanese, the corresponding part of the page will show "No Natsumi Sato report screen Japan ページ"
Note:
The Xlf file is generated from an XML file, so it is possible to generate a XLF file, regardless of whether the XML is local or on the server, as long as there is a location where the XML file is specified.
This example shows an operation in a local environment. Similarly, you can also create server-based Xliffextractor and xliffimporter specific operations that can be referenced oaf Developer ' s Guide
However, according to my experience is the server-based import and export operations than the local trouble, and the resulting XLF file readability is poor, (there is no automatic line wrapping in the Xlf file), so it is not recommended.
Reference:
OAF Developer ' s guide:translating personalizations
Original address:
The implementation of multi-language in Oaf
Implementation of multiple languages in oaf (RPM)