The OA Extension Translation toolset deals with translatable information contained in OA Extension pages using XLIFF, a widely used XML format for transferring and manipulating translatable resources.
Note: The toolset actually uses oraXLIFF, an Oracle dialect of XLIFF defined and used by WPTG (Oracle's Worldwide Product Translation Group).
The Translation toolset consists of the following:
XLIFF Extractor - extracts tanslatable information from MDS applications (held in the filesystem or in a MDS repository) or from MDS personalization (XML) files into well formed oraXLIFF files.
XLIFF Importer - imports translated information in an oraXLIFF file into the MDS repository.
The XLIFF Extractor extracts the translatable information from a given OA Extension document, into an oraXLIFF file. The XLIFF Extractor can:
Extract the base language information from an OA Extension document or from all documents in a directory present in a file system.
Extract the base language information from an OA Extension personalization XML document on the file system.
Extract the base language information from an OA Extension document or personalization in a MDS repository.
Extract translated language information from an OA Extension document, only from a MDS repository.
The XLIFF Extractor for the Oracle E-Business Suite behaves according to the following rules:
Oracle E-Business Suite-Specific Rules
Do not extract strings containing at least one underscore and no space.
The trans-unit ID should start with ".oracle.apps".
Support the DBDRV command.
General Rules
Do not extract numeric strings (string does not contain any alpha characters).
Do not extract null strings.
Attention: If the value of xml:lang is 'end-US', apply only Oracle E-Business Suite-specific rules 2 and 3 and general rule 2.
To use the XLIFF Extractor, ensure that your classpath, path and environment are set up similar to the environment required for applying an AD patch, and call Java oracle.jrad.tools.trans.extractor.XLIFFExtractor <full_path_of_file_or_directory_name> with the appropriate parameters.
If you have Oracle JDeveloper OA Extension, you may alternatively use the xliffextract.bat script for Windows or the xliffextract shell script for Linux that is packaged with the JDeveloper IDE, located in the jdevbin\jdev\bin directory of the JDeveloper install area. The batch file and shell script each set up the classpath, path and environment for you. Just typing xliffextract for Windows or ./xliffextract for Linux at the command prompt without any parameters will give help about its usage. Parameters enclosed in square brackets [ ] are optional.
ExampleJava oracle.jrad.tools.trans.extractor.XLIFFExtractor <fullPathOfFileName_or_directoryname> [-username <username>] [-password <password>] [-dbconnection <database_connection>] [-xliff_extension <xliff_extension>] [-root <MDS_root_dir>] -mmd_dir <dir_of_MMD_files> [-DBDRV <APPS_db_drivers>] [-xliff_dir <XLIFF_output_dir>] [-rootPackage <rootpkg>] [-includeSubpackages] [-product_name <product_name>] [-category <category>] [-source (db | file)] [-languages <target_language(s)>]
Note: In addition to the parameter passing style shown above, you may also pass parameters using the style, parameter=<value>.
Replace the arguments as indicated in the explanation of the parameters below:
<fullPathOfFileName_or_directoryname> - (Required) Replace with the full path or fully qualified package name of an OA Extension XML document to extract translatable information from a single document, or replace with the full path of a directory to extract information from all the documents in the directory. This argument is case-sensitive. For example:
To specify a file name on the filesystem:
$APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/ customizations/site/0/AdvancWorklistRG.xml
To specify a package name in the MDS repository:
/oracle/apps/fnd/wf/worklist/webui/ customizations/site/0/AdvancWorklistRG
To specify a directory name:
$APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/ customizations/site/0/
-username - (Optional if extracting from the MDS repository) Specify a username for the database to extract from.
-password- (Optional if extracting from the MDS repository) Specify a password for the database to extract from.
-dbconnection - (Optional if extracting from the MDS repository) Specify a database connection for the database to extract from, in TNSNAMES format.
-xliff_extension - (Optional) Specify a file extension for the generated XLIFF files. The default is xlf.
-root - (Optional) Specify a MDS root directory from where the xml files can be found or are to be saved to. The default is the current directory. Note that if you extract your documents from an MDS repository, the new documents will overwrite any existing ones in the specified MDS Root directory.
-mmd_dir - (Required) Specify the directory location of the OA Extension MMD files to use. The MMD files define which properties are translatable and enumerate the properties that are part of the translation context (the useful context information to carry out the translation of the translatable property).
-DBDRV - (Optional) Specify the directive for the APPS database drivers. This is added as a comment in the XLIFF file before the root element. The default is " ".
-xliff_dir - (Optional) Specify the source directory for XLIFF files. This is where the XLIFF files are created or expected by the XLIFF Importer. The default is the current directory.
-rootPackage - (Optional) Specify the virtual package after rootdir and the next subdirectory.
-includeSubpackages - (Optional) This parameter flag is only valid when your input for extraction is a directory. If specified, this flag recursively extracts from all xml files in the directory and the subdirectories under it. It is therefore important you only have MDS xml files in the directory hierarchy when using this argument. If this argument is not specified, the XLIFF Extractor just processes the files in the current director.
-product_name - (Optional) Specify the product name for generated XLIFF files.
-category - (Optional) Specify the product category for generated XLIFF files.
-source - (Optional) Specify whether the source for XLIFF extraction is a database (db) or file. If you specify db, XLIFF Extractor will extract translation content for xml from the MDS repository. The default is file.
-languages - (Optional) Specify a comma separated list of target languages for which the XLIFF documents are to be created. Specify the languages 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. The 'target-language' attribute in an XLIFF file is set based on the language specified in the -languages parameter. XLIFF Extractor creates multiple copies of the same .xlf file with different target languages and stores each in a subdirectory with the target language as its name. XLIFF Extractor also merges the translated attributes from the repository into the generated XLIFF file if database connection parameters are provided. The default is " ".
If both the XML file from the file system and the XML file from repository are different (XML file from file system contains extra translatable strings), you can use XLIFF Extractor with the -languages option. This merges the translated attributes from the repository so that the generated XLIFF file contains both translated and untranslated strings.
XLIFF Extractor does the following when the -languages option is specified:
If there is a language translation for an attribute in the repository, for say Fr-FR, but the XML file from the file system no longer has that attribute (meaning that it is a stale trans-unit), the XLIFF Extractor ignores that string.
If the XML file from the file system contains a translated attribute, but the translation for that attribute is not available in the repository, the XLIFF Extractor extracts the translation for the attribute so that the generated XLIFF file contains the untranslated target string.
If there is a translation for an attribute in the repository, and the XML from the file system also contains that attribute, the XLIFF Extractor extracts and merges the translation for the attribute so that the generated XLIFF file contains the translated target string.
| Attribute "AAA" in XML in file system | Translation for attribute "AAA" in repository | XLIFF file |
|---|---|---|
| Not present | Present | Attribute string ignored. |
| Present | Not present | Contains untranslated "<target>AAA<target>" |
| Present | Present, translation string is BBB | Contains "<target>BBB<target>" |
If both the XML file from the file system and the XML file from the repository are the same, you can use Export -translations to export and extract the XLIFF file. The resulting XLIFF file contains only the translated strings. You can use this method to transfer the already translated contents from your repository to the file system, so you can then move the translations from one repository to another. Note that in the degenerate case where translations for all the translatable attributes of a XML file exist in a repository, the XLIFF files created by both "Export -translations" and "xliffExtract -languages" are similar.
Notes:
If a "package" attribute is specified in the XML file's top level component, that attribute will determine the package to which the document belongs. This takes precedence over the values specified by the -rootPackage and -rootDir options even though rootDir is still mandatory.
If for some reason (such as duplicate ID's in the input XML files) duplicate trans-unit IDs get created, the XLIFF Extractor displays the possible duplicate trans-unit IDs as errors and exits without saving the XLIFF file.
XLIFF Extractor does not generate trans-units if the string does not contain any alphabetical character even when other "translation rules" are satisfied. For example, no trans-unit would be generated for "123 456", but a trans-unit would be generated for "123 456 test."
XLIFF Extractor requires XDK903/XDK904 to be used. However, XLIFF can be extracted from personalized documents with XDK817 [the version in IAS 2.0.2.9, which the runtime version uses.]
To extract the base language content from the FND_MESSAGES_PAGE.xml file in the file system into a new document located in f:\temp\oracle\apps\fnd\pages\US\FND_MESSAGES_PAGE.xlf (for Windows) or /private/oaext/oracle/apps/fnd/pages/US/FND_MESSAGES_PAGE.xlf (for Linux):
For Windows
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor
f:\temp\oracle\apps\fnd\pages\FND_MESSAGES_PAGE.xml
mmd_dir=f:\deliver\jdev
root=f:\temp\oracle DBDRV="my dbdrv command"
xliff_dir=f:\temp\oracle\apps\fnd\pages\US
rootPackage=/oracle
For Linux
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor /private/oaext/oracle/apps/fnd/pages/FND_MESSAGES_PAGE.xml mmd_dir=/usr/local/jdeveloper/jdev/lib/ext/jrad/config/mmd root=/private/oaext DBDRV="my dbdrv command" xliff_dir=/private/oaext/oracle/apps/fnd/pages/US rootPackage=/oracle
To extract the base language content from the personalized FND_MESSAGES_PAGE.xml file in the file system into a new document located in f:\temp\oracle\apps\fnd\pages\US\FND_MESSAGES_PAGE.xlf (for Windows) or /private/oaext/oracle/apps/fnd/pages/US/FND_MESSAGES_PAGE.xlf (for Linux):
For Windows
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor f:\temp\oracle\apps\fnd\customizations\site\0\pages\FND_MESSAGES_PAGE.xml mmd_dir=f:\deliver\jdev\lib\ext\jrad\config\mmd root=f:\temp DBDRV="my dbdrv command" rootPackage=/oracle xliff_dir=f:\temp\oracle\apps\fnd\customizations\site\0\pages\US
For Linux
ava oracle.jrad.tools.trans.extractor.XLIFFExtractor /private/oaext/oracle/apps/fnd/customizations/site/0/pages/FND_MESSAGES_PAGE.xml mmd_dir=/usr/local/jdeveloper/jdev/lib/ext/jrad/config/mmd root=f:\temp DBDRV="my dbdrv command" rootPackage=/oracle xliff_dir=/private/oaext/oracle/apps/fnd/customizations/site/0/pages/US
To extract translation content for XML from a repository:
For Windows
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor \XLIFFExtractTest1 -root d:\temp -mmd_dir d:\jdev495\jdev\lib\ext\jrad\config\mmd -xliff_dir d:\temp\xliff -source db -username jdr -password jdr -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host = mach1.company.com) (port = 1521)))(connect_data = (sid = db100)))"
For Linux
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor /XLIFFExtractTest1 -root /private/oaext -mmd_dir /usr/local/jdeveloper/jdev/lib/ext/jrad/config/mmd -xliff_dir /private/oaext/xliff -source db -username jdr -password jdr -dbconnection "(description = (address_list = (address = (community = tcp.world)(protocol = tcp)(host = mach1.company.com) (port = 1521)))(connect_data = (Sid = db100)))"
When you extract translation content for XML with different target languages, XLIFF Extractor creates multiple copies of the XLIFF file, one for each language. Each copy is saved to the same directory structure, under a subdirectory of the same name as the target language. The following Windows example creates the files c:\temp\Fr-FR\page1.xlf with target-language="Fr-FR" and c:\temp\JA-JP\page1.xlf with target-language="JA-JP".
For Windows
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor c:\temp\oracle\apps\fnd\page1.xml -rootdir c:\temp -xliff_dir c:\temp -languages Fr-FR,JA-JP
For Linux
Java oracle.jrad.tools.trans.extractor.XLIFFExtractor /private/oaext/oracle/apps/ak/pages/page1.xml -rootdir /private/oaext -xliff_dir /private/oaext/output -languages Fr-FR,JA-JP
The XLIFF Importer takes a translated XLIFF file and imports it into the MDS Repository. This effectively deploys the translated OA Extension document. The Importer tool performs the following validations on the XLIFF files it imports:
Verifies that the XLIFF file has been translated to another language, where the target-language attribute in the top <File> element is different than the source-language attribute.
Verifies that the target-language attribute is different from the original OA Extension document's base language (to prevent users from bloating the MDS repository).
To use the XLIFF Importer, ensure your classpath, path and environment are set up similar to what is required for applying an AD patch and call Java oracle.jrad.tools.trans.imp.XLIFFImporter <full_path_of_file> with the appropriate parameters.
If you have Oracle JDeveloper OA Extension, you may alternatively use the Windows xliffimport.bat file or the xliffimport Linux shell script that is packaged with the JDeveloper IDE, located in the jdevbin\oaext\bin directory of the JDeveloper install area. The batch file and shell script each set up the classpath, path and environment for you. Just typing xliffimport without any parameters will give help about its usage.
Java oracle.jrad.tools.trans.imp.XLIFFImporter <full_path_of_file> -username <username> -password <password> -dbconnection <database>
The arguments should be replaced as described for the corresponding parameters below:
<full_path_of_file> - (Required) Replace with the full path to an XLIFF filename to import. This argument is case-sensitive. For example:
$APPL_TOP/admin/patch/oracle/apps/fnd/wf/worklist/webui/ customizations/site/0/FR/AdvancWorklistRG.xlf
Additional Information: While you should keep your XLIFF file on your file system in a hierarchy that mirrors your MDS repository, (for example, the oracle/apps/fnd/pages/FND_MESSAGES_PAGE.xlf file corresponds to the /oracle/apps/fnd/pages/FND_MESSAGES_PAGE OA Extension page), the Importer tool can accept any valid oraXLIFF file from any file system location.
-username - (Required) Specify the username for the database to import to.
-password - (Required) Specify the password for the database to import to.
-dbconnection - (Required) Specify the database connection for the database to import to, in tnsnames format.