Filter to extend an XLIFF file with <target> tag

Dear experts,

I´ve an XLIFF file to translate. This file contains only <source></source> tag, but NO <target></target> tag. My customer expect the translated segments in the <target></target>segment, which the filter somehow should magically include into the text. Is it possible to extend the target document with a <target> segment?

Source File contains only source tag:
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
    <file source-language="de" target-language="en" datatype="plaintext" original="file.ext">
        <body>
            <trans-unit id="asp_help_text" resname="asp_help_text">
                <source xml:lang="de">Hilfe</source>
             </trans-unit>
            <trans-unit id="asp_contact_text" resname="asp_contact_text">
                <source xml:lang="de">Kontakt</source>
             </trans-unit>
        </body>
    </file>
</xliff>
-----------------------------------------------------
Expected Translation extended with target tags:
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
    <file source-language="de" target-language="en" datatype="plaintext" original="file.ext">
        <body>
            <trans-unit id="asp_help_text" resname="asp_help_text">
                <source xml:lang="de">Hilfe</source>                
                <target xml:lang="en">Help</target>
             </trans-unit>
            <trans-unit id="asp_contact_text" resname="asp_contact_text">
                <source xml:lang="de">Kontakt</source>
                <target xml:lang="en">Contakt</target>
             </trans-unit>
        </body>
    </file>
</xliff>

 

Thanks a lot!

Parents Reply
  • Dear Sebstien,
    thanks for your reply, but I do not have any <target> element in the file. I only receive a file like that:
    Source File contains only source tag, but NO target tag:
    <?xml version="1.0" encoding="utf-8"?>
    <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
    <file source-language="de" target-language="en" datatype="plaintext" original="file.ext">
    <body>
    <trans-unit id="asp_help_text" resname="asp_help_text">
    <source xml:lang="de">Hilfe</source>
    </trans-unit>
    <trans-unit id="asp_contact_text" resname="asp_contact_text">
    <source xml:lang="de">Kontakt</source>
    </trans-unit>
    </body>
    </file>
    </xliff>

     

    I did try to translate this document and the translation did replace the text in <source> </source> tag. I still did not get any <target> element. Any ideas?

    Thanks!

Children