Salesforce

WorldServer How to set up a XLF/XLIFF File Type Configuration for target segment only

« Go Back

Information

 
TitleWorldServer How to set up a XLF/XLIFF File Type Configuration for target segment only
URL Name000021172
SummaryWhile in versions before 11.8.1, the XLIFF 1.2 File Type extracted the source segment text for translation only, starting from version 11.8.1 the behaviour has changed and is now in line with other RWS products such as Trados Studio and Trados Enterprise. This means that if text is present in the <target> element, it is assumed that it is translated content and it will be automatically inserted in the target segment. However, in our case this change in behaviour of the XLIFF 1.2. File Types causes issues because the actual translation from our TM is no longer leveraged and we have to change our workflow by adding a Pretranslate Segments step to overwrite the text inserted in the target segment by the filter - which in our case is the same as the source text. 

This article provides a workaround.
Scope/EnvironmentWorldServer 11.8.1
Question
Our XLF source files contain the <target> element with text identical to the <source> element. For example:
 
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
    <file datatype="x-android-res" original="ivi/infot/strings.xml" product-name="com.assistant" product-version="1.0" source-language="en-US" target-language="nl" build-num="20230804">
        <body>
            <trans-unit id="string:general_title" translate="yes">
                <note><![CDATA[General Title for all Cards]]></note>
                <source>Look what I found</source>
                <target>Look what I found</target>
            </trans-unit>
            <trans-unit id="string:card_title_alexa" translate="yes">
                <source>This is a house</source>
                <target>This is a house</target>
            </trans-unit>
        </body>
    </file>
</xliff>

While in versions before 11.8.1, the XLIFF 1.2 File Type extracted the source segment text for translation only, starting from version 11.8.1 the behaviour has changed and is now in line with other RWS products such as Trados Studio and Trados Enterprise. This means that if text is present in the <target> element, it is assumed that it is translated content and it will be automatically inserted in the target segment. The behaviour is explained in this article:

WorldServer - what has changed in the handling of bilingual file formats (XLIFF, PO, CSV and bilingual XLSX) starting from version 11.8.1?

However, in our case this change in behaviour of the XLIFF 1.2. File Types causes issues because the actual translation from our TM is no longer leveraged and we have to change our workflow by adding a Pretranslate Segments step to overwrite the text inserted in the target segment by the filter - which in our case is the same as the source text. 

How can we achieve the same behaviour as before the upgrade where only the target element is extracted for translation?
 
Answer
You can achieve the same behaviour by applying a Custom XML2 file type configuration to your project. The file type configuration should be created in Trados Studio, but we have attached such a configuration to this article for your convenience (XML2_for XLF_tgt_elements.sdlftsettings). The important settings are in the Parser section:

User-added image

When importing the file type configuration (see attachment: XML2_for XLF_tgt_elements.sdlftsettings file), give the configuration a name of your choice. In our example, we have used "XLIFF source target identical". After the import, the configuration will be visible under the Custom XML 2 File Type.

Once you have imported the attached file type configuration in your WorldServer environment, create a Filter Group/File Type sequence associating the XLF/XLIFF Mime Type (check the Mime Types table under Management > Administration > Customization if unsure) and apply it to your Project Type. Here is how such a Filter Group/File Type Sequence might look like:

User-added image

Important: This file type configuration really applies to XLF source files where ALL target elements contain the same text as the source element. The content of the target element only is extracted for translation and will be replaced with the actual translation entered by a translator or coming from a TM or Machine Translation. This configuration does not extract the source element at all.

This means that if any of the target elements is empty, it will not be displayed/extracted as a segment at all.
The file type configuration is also not applicable to mixed source XLF files where some target elements contain the same text as the source element, and others contain translated text. Under this scenario, you will have source segments in different languages. If your source XLF file is not as described, use the default XLIFF 1.2 File Type and refer to this article for further details:

WorldServer - what has changed in the handling of bilingual file formats (XLIFF, PO, CSV and bilingual XLSX) starting from version 11.8.1?
Reference
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by