Generation of target file for multi-language XML file

Hi all, 

I struggling with the generation of a target file, which is a multi-language XML file that have previously been successfully read be Passolo.

My XML file has this structure, after I have read these posts (https://community.sdl.com/product-groups/translationproductivity/sdl_passolo/f/142/t/17089, https://community.sdl.com/product-groups/translationproductivity/sdl_passolo/f/142/t/16929)

 

 <Translation UId="12a31c01-4c24-4b00-ae50" Id="ID_VIEW">
<target lng="en">Create</target>
<source lng="de">Erstellen</source>
<target lng="it">Creare</target>
<target lng="es">Crear</target>
<target lng="fr">Créer</target>
<target lng="zh">创建</target>
<target lng="ru">Создать</target>
<target lng="ja">作成</target>
<target lng="ko">생성</target>
</Translation>

Passolo understands this structure perfectly. German is my source language and I could import all available translations with the alignment function (read target file).

After some translation changes in Passolo, I now want to generate the target file.

This is what my parser rules look like:

What happens is, that the last generated language is written to the first target element and the language attribute is set to "de":

<Translation UId="12a31c01-4c24-4b00-ae50-108376982b79" Id="ID_VIEWS_CREATE_VIEW">
<target lng="de">생성</target>
<source lng="ko">Erstellen</source>
</Translation>

What am I missing? Where is my lack of knowledge? Or can't this be done with the default XML parser and I need to consider Tip 5 from  and solve this issue with the SDL Passolo SDK.

I am thankful for every hint to be able to read, translate and generate this multi-language XML file (or similar structure, it could be changed, if useful).

 

Thanks in advanced, 

 

Markus

 

  • Once again, thank you very much, Mr Herrmann. I provided you with the files.
  • This is a tricky one and it seems that I also have to talk to development if this can be improved in future release. I will show different solutions and work-arounds so that you can decide which works best for you.

    In Passolo there seem to be an issue with multiple equally named language tags which is the case in your file structure

    Solution 1: (My preferred one)

    If you able please change the XML structure and equally name the translatable elements.

    With equally named elements you can delete the language tag for <source>. You still will be able to select German or any other language as the source.

    Solution 2: Work-around with the existing file structure

    I changed the rule and deleted the language tag for <source>

    To correctly import the source strings I additionally changed the source language from German to All Languages

    I haven’t completely tested it but maybe a different solution is to rename the source language tag.

    Other Changes:

    All the changes above will not completely solve the problem. There is still one mistake in the project configuration for multilingual projects. As it is also important for all other users that are dealing with multilingual projects, I will explain it here in further detail.

    The project configuration has one source file and one target file.

    This will NOT work. Using such a configuration the source file will always be copied to the target file before the translations are inserted. This will always overwrite translations from previous languages with the content from the source file.

    For multilingual projects you always have to write back into the source file, so the configuration must look like this:

    Hope that solves the issues.

  • Hello Achim, thanks a lot for your effort. I stick to your preferred solution 1 and it seams to work perfectly.