.xlf files

Impossible to open .xlf files, even the correct file type settings are added. When opening .xlf file, receiving an error message: "The source language of the file is different from the project source file."

Parents
  • XLF files are bilingual files.  They have a language code in the file and Trados Studio will read these languages.  If you create a project that uses different languages to the ones specified in the XLIFF file then you'll receive a message like that.

    Open the XLIFF with a text editor and tell us what the language codes are?  For example:

    Screenshot of an XLIFF file opened in a text editor showing source language as German (de-de) and target language as English (en-gb).

    The source language here is German (Germany) and the target language is English (United Kingdom... or Great Britain).

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:40 AM (GMT 0) on 29 Feb 2024]
  • Notepad application open with an XML file displaying code for electronic architecture with UTF-8 encoding.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:40 AM (GMT 0) on 29 Feb 2024]
  • The "target language" doesn't even appear.

    It does... although it's the same as the source:

    Screenshot showing source and target language both set to 'lv' for Latvian in Trados Studio.

    Both Latvian.  So this is the problem.  If you only have this one file to handle you could simply change one of them to be the code you expect.

    OR... and this is really cool... you could use this filetype from the AppStore (as long as you have Trados Studio 2021 SR2) because this filetype doesn't give a hoot about specifications or requirements, it will simply allow you to translate the file as you see fit without changing the language codes or anything:

    https://appstore.sdl.com/language/app/multilingual-xml-filetype/1261/

    This is without a doubt my favourite app of all time!

    Maybe I can add the "target language" part by myself and somehow save the file back as .xlf file? (I am not very good with computers)

    Yes, you could do this.  It is quite simple, although I would have expected the tool that created it (Elucidat by the looks of it) to have been configured correctly in the first place so it may be worth going back to your customer in case they made a mistake of some kind?

    Or use the Multiingual filetype, return the translations in the XLF, and let your client deal with the language code problem... if it's even a problem for them.  If you do have Trados Studio 2021 SR2 installed then if you send me the file I'd be happy to configure the settings for you as I think you may need to a little help.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 5:40 AM (GMT 0) on 29 Feb 2024]
  • Thank you!
    Simply changing the code doesn't work, another error messages appeared, the file opened, and even let me translate several segments, but then the Trados suddenly closed - the old error with the Trados 2021 crushing without warning.
    I installed the app you suggested, but I'm not sure how it can help me. I made a new project with the .xlf file to translate, but it still didn't open and just showed the error message about language inconsistency. So, I guess I will have to get back to the routine that I used to keep my translations in translation memory – open .xlf file with the Word, manually remove all strange characters, copy and then paste a clean Unicolde text in a fresh Word file, and translate the file in Trados. And after that just copy all the translations manually in the clients programm. Lot of time wasting and trouble and only to enter the translations in Translation Memory.

  • I installed the app you suggested, but I'm not sure how it can help me. I made a new project with the .xlf file to translate, but it still didn't open and just showed the error message about language inconsistency.

    This is because you don't know how to configure it.  That's why I offered to help as I suspected that might happen.  The wiki is helpful, but if you are not good with computers it may not be enough:

    https://community.rws.com/product-groups/translationproductivity/w/customer-experience/6039/multilingual-xml-filetype

    If you email me the XLF I'll happily take a look for you?  Also tell me what language pair you want to work with - pfilkin@rws.com

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

  • Thank you! Yes, I did the configuration what was described in the wiki, but, obviously, it wasn't enough:) I would really appreciate your help – I just sent you an e-mail. Thank you in advance!

  • ok - I changed the language codes first just to see why you were getting an error.  But I don't have a problem and it works just fine:

    However... it is all CDATA which is why you get these tags, and it's also full of this sort of stuff which you'd have to filter out, just ignore, or copy source to content:

    And it's also full of embedded HTML code even within the translatable text.  This is also harder to handle with the default XLIFF filetype.

    But having said this I also still see some errors being reported and this is because the XLIFF is actually invalid.  I ran it through a validating tool and get this:

    So the Multilingual XML filetype is probably a better approach, specially since you don't need to worry about changing the language codes.  So I tried that and oddly enough it still fails when I use the HTML embedded Content Processor to handle the embedded HTML in this file... but it works fine if I use the Text Embedded Content Processor.  So I believe there is also something wrong with the HTML inside the CDATA sections somewhere.

    Despite this, I can achieve this which is a lot cleaner so getting closer:

    But that didn't handle the embedded tags and placeholders.  So I also created a bunch of rules in the embedded text processor... not that many needed as far as I could see...and now it's not bad at all:

    The Multilingual XML processor settings were these:

    I also used the Advanced Display Filter to lock all the tag only segments and then hide them so in the end I'm left with a fairly clean file.  I'll send you my SDLXLIFF so yo can at least open it and see where I can get this to.  It's still not perfect because the segmentation is impossible to achieve perfectly, but it is workable and I'm fairly sure a better solution than your other methods.  Certainly out of the box this file cannot be handled sensibly at all as it is a very poor example of how to prepare XLIFF.

    My settings file is the attached project template.  This should be easier for you to use because it also contains the settings for the embedded content processor:

    VV.zip

    My template is based on en-US to lv-LV because you didn't tell me what language pairs you needed.  I'll drop you an email with the rest because I'm not sure if your file is confidential or not.

    You use the template by importing it into your "Project Templates" under File -> Setup -> Project Templates and then you can select this template when you create your project.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  • ok - I changed the language codes first just to see why you were getting an error.  But I don't have a problem and it works just fine:

    However... it is all CDATA which is why you get these tags, and it's also full of this sort of stuff which you'd have to filter out, just ignore, or copy source to content:

    And it's also full of embedded HTML code even within the translatable text.  This is also harder to handle with the default XLIFF filetype.

    But having said this I also still see some errors being reported and this is because the XLIFF is actually invalid.  I ran it through a validating tool and get this:

    So the Multilingual XML filetype is probably a better approach, specially since you don't need to worry about changing the language codes.  So I tried that and oddly enough it still fails when I use the HTML embedded Content Processor to handle the embedded HTML in this file... but it works fine if I use the Text Embedded Content Processor.  So I believe there is also something wrong with the HTML inside the CDATA sections somewhere.

    Despite this, I can achieve this which is a lot cleaner so getting closer:

    But that didn't handle the embedded tags and placeholders.  So I also created a bunch of rules in the embedded text processor... not that many needed as far as I could see...and now it's not bad at all:

    The Multilingual XML processor settings were these:

    I also used the Advanced Display Filter to lock all the tag only segments and then hide them so in the end I'm left with a fairly clean file.  I'll send you my SDLXLIFF so yo can at least open it and see where I can get this to.  It's still not perfect because the segmentation is impossible to achieve perfectly, but it is workable and I'm fairly sure a better solution than your other methods.  Certainly out of the box this file cannot be handled sensibly at all as it is a very poor example of how to prepare XLIFF.

    My settings file is the attached project template.  This should be easier for you to use because it also contains the settings for the embedded content processor:

    VV.zip

    My template is based on en-US to lv-LV because you didn't tell me what language pairs you needed.  I'll drop you an email with the rest because I'm not sure if your file is confidential or not.

    You use the template by importing it into your "Project Templates" under File -> Setup -> Project Templates and then you can select this template when you create your project.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children