The XLIFF File Contains An Invalid Target Language.
XLIFF files used for translation must follow specific file format and context rules in order for the translation to occur (see XLIFF Files).
One of these rules is: The source and target language of the XLIFF file must be different.
If the source and target language within the XLIFF file are the same, then the XLIFF file translation will fail.
Received Error
If the source and target language within the XLIFF file being translated are identical , you will receive the following error message:
"Source and target languages must be different. Both are 'en'.”
The provided error message will be similar to the one above; however, the displayed language will vary based on the file being used for the translation.
Explanation
Wordbee Translator expects an XLIFF file where the source and target languages are different. For example, the following XLIFF file will fail to be processed by the system because both the source and target language is set to "en" (English):
<xliff version="1.0"> <file target-language="en" source-language="en" datatype="plaintext" original="messages2" date="2011-10-18T18:20:51Z" product-name="my-ext"> <header/> <body> <trans-unit id="headerComment" xml:space="preserve"> <source>The default Header Comment.</source> </trans-unit> <trans-unit id="generator" xml:space="preserve"> <source>The "Generator" Meta Tag.</source> </trans-unit> </body> </file> </xliff>
Fixing the Problem
There are two ways to fix this problem and ensure that the XLIFF file can be translated, either:
- Change the target language within the XLIFF file to a different language.
- Change the source language of the XLIFF file to a different language.
Make certain the source and target languages match the context of the project, order form, etc. in Wordbee Translator, otherwise you will receive another error when attempting to translate the XLIFF file.
Copyright Wordbee - Buzzin' Outside the Box since 2008