The RWS AppStore > Wiki is no longer being maintained. For the latest updates and changes being published, please visit the official RWS AppStore, where you will find supporting information such as documentation & change log details that is associated to each app.
Alternatively if you are using Trados Studio 2022 SR2, you will find the same information within the Integrated AppStore.
Table of Contents
The Multilingual XML Filetype is a new filetype available for Trados Studio SR2 and later. The basic usecases for this filetype are:
- create bilingual or multilingual projects from an XML file containing at least two languages
- handle large CDATA dumps in XLIFF files correctly
- handling well formed, but invalid XLIFF files that Trados Studio will not handle out of the box
- handle bilingual or multilingual XML files without the need to copy the source into the target element and translate the target element only.
- handle partially translated bilingual or multilingual XML files
The filetype was also presented at the Autumn 2021 Elevate conference:
The filetype can be installed through the AppStore integration in Trados Studio (image below), or by downloading the sdlplugin file from the website and double clicking it to invoke the plugin manager.
Once installed you should find the new filetype installed here:
If you don't see the filetype in your options make sure you have enabled it here:
You will also find two new batch tasks:
These will be explained below.
- the only option available here is to specify the file dialog wildcard expression if needed. In this example you can see *.tmx has been added. This would allow you to use this filetype to translate a TMX file. The only requirement is that the type of file you are opening is a well-formed XML file.
- here you specify the location of the languages root element. This is done by using an XPath expression. In this example the TMX file looks like this:
The XPath expression to the languages root element would be:
This is because the languages are defined within the tuv element for each tu element.
- each language in your file can be added to this section by clicking on the Add button, defining the Language and specifying the XPath query that locates the actual translatable content:
In this example the translatable content is actually in the seg element, but the language defined in each case is controlled by an attribute in the tuv element. So the XPath expression needs to specifically point to where each language will be found:
The screenshot above shows multiple languages because the file is a multilingual TMX and this filetype can support the creation of a multilingual project from this single TMX file.
A simpler example could be something like a basic bilingual XML file:
Here the settings would be like this:
The Language Root XPath would be:
The location would be the language element used in the file:
en and de respectively.
It's very important to make sure that the paths are correct. The main reason for the filetype not being associated with the file opened for translation is failing to accurately specify the XPath locations. If you have any questions on how to do this for your filetype the recommendation is to ask for help in the appropriate forum
XML files come in all shapes and sizes so some knowledge of how to use XPath is essential. If you are completely new to XPath you may also find these resources useful:
- XPath tutorial in W3Schools - https://www.w3schools.com/xml/xpath_intro.asp
- XML in a nutshell, chapter 9 XPath - https://docstore.mik.ua/orelly/xml/xmlnut/ch09_01.htm
- More regex? No, it's time for something completely different - https://multifarious.filkin.com/2013/07/30/xpath/
- X Files - ATA 56 - https://multifarious.filkin.com/2015/11/07/x-files-ata56/
The last two at least relate to using Trados Studio.
Adding additional languages
A last point on this section. If you wish to add a new language into the file that wasn't present in the source then this is also possible. Just add the new language to your language settings for the project and then create the appropriate rule in the language mappings. You can now translate this additional language and when you save your Multilingual Translations via the batch task you will find the new language has been added to the file based on the XPath expression you used to map this additional language.
This section is the same as for any embedded content processing in Trados Studio. An important point is that you do not have this ability to use another filetype (html for example) as an embedded content processor in the XLIFF filetypes supported by Trados Studio. So this is a big advantage, especially when handling XLIFF files that make heavy use of large CDATA sections in single translation units.
This section supports the ability to "tag" text as a placeholder in Trados Studio irrespective of whether you are also using an embedded content processor or not. This is an extremely useful feature because all other filetypes in Trados Studio that offer embedded content processing are either one or the other, so regex rules for everything OR use another fietype like html for the embedded content processing.
The filetype comes with four predefined rules that you can use if appropriate, or remove and just create your own rules. The process is simple, just click on Add:
Then write your regular expression, define the segmentation hint, and if you wish you can add a description. It's worth adding a description because you can also import/export the rules you have created to make it easier to share with others, or even maintain a library for yourself that you can simply import and then remove the ones you don't need as a starting point when setting up your filetype for a specific project. The different options available to you are defined across the toolbar:
This section provides entity support that works the same way as it does for any filetype in Trados Studio that supports them. See the producthelp for more details.
This section provides support for QuickInserts that works the same way as it does for any filetype in Trados Studio that supports them. See the producthelp for more details.
Using the Multilingual Filetype
Creating a project
- the first thing to note is that your project template/settings must contain all the languages you have specified in your filetype settings
- the second thing to note is that if your filetype settings are incorrect in any way then the Multilingual XML Filetype will not be recognised as it has in the screenshot above
When you add a multilingual XML file, properly set up, your multilingual project will be created for all the language pairs specified allowing you to manage the project in the usual way.
In the Installation section above it was mentioned that two new batch tasks are added to Trados Studio:
- Import Multilingual Translations
- Generate Multilingual Translations
Import Multilingual Translations
This batch task will import all translations that may be present in the source file. If you have the Professional version of Trados Studio you can create custom tasks that include this task as part of the project preparation. In the screenshot below you can see the task is a custom task that only does three things - converts to translatable format, copies to target languages and imports the multilingual translations:
If you are using the Freelance version of Trados Studio then you will need to run this task after the project has been created.
The options allow you to do four things:
- overwrite existing translations. So if you are importing a file translated elsewhere and you need to use that as the approved translations you can import it and replace anything in your project with the target translations of your approved file.
- define the origin system. This will add whatever information to write in here into the SDLXLIFF file. Maybe useful for filtering on the file at some point or for identifying where the imported translations came from for example.
- set the segment status. This just allows you to define what status the imported translations should have when opened in the Trados Studio editor.
- exclude segments. This will prevent segments with the selected criteria in Trados Studio from being updated with the contents of the imported file.
Generate Multilingual Translations
This batch task will generate the target multilingual file when you have completed the project (or earlier if you wish). It is different to the out of the box generate target translations, which will also work, because it will take the target translations from each of the files you have translated in a multilingual project and merge them back into single files again. This will be very beneficial because the out of the box task will create separate files for each language pair being translated and you would then have to merge them all into single files manually afterwards.