Multilingual XML file type - not being recognized when I add the XML

Former Member
Former Member

Hello all,

I'm trying out the multilingual file type for the first time, and I've hit a wall. I've reviewed the material from Paul Filkin and I'm stuck, but not sure where my error is. I'm also a novice at XPath, so that could be my issue. Studio 2021 SR2

This is what my content looks like:

<?xml version="1.0" encoding="utf-8"?>
<Localization_Messages xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xsi:noNamespaceSchemaLocation="XX_Translation.xsd">
<!--Home Tab-->
<M Code="EditBoolPropertiesMessage" Category="Message" Translate="Y" Parameters_count="1" Parameters_Description="Options to choose">
<Lang ID="EN"><![CDATA[Select {0}:]]></Lang>
<Lang ID="DE"><![CDATA[]]></Lang>
<Lang ID="FR"><![CDATA[]]></Lang>
<Lang ID="IT"><![CDATA[]]></Lang>
<Lang ID="ES"><![CDATA[]]></Lang>
</M>
<M Code="SelectArchivingFolder" Category="Message" Translate="Y">
<Lang ID="EN"><![CDATA[Select a folder to store audit files.]]></Lang>
<Lang ID="DE"><![CDATA[]]></Lang>
<Lang ID="FR"><![CDATA[]]></Lang>
<Lang ID="IT"><![CDATA[]]></Lang>
<Lang ID="ES"><![CDATA[]]></Lang>
</M>
<M Code="SaveSettingsSuccessful" Category="Message" Translate="Y">
<Lang ID="EN"><![CDATA[Settings changes are saved.]]></Lang>
<Lang ID="DE"><![CDATA[]]></Lang>
<Lang ID="FR"><![CDATA[]]></Lang>
<Lang ID="IT"><![CDATA[]]></Lang>
<Lang ID="ES"><![CDATA[]]></Lang>

This is what my language mapping is setup as:

Trados Studio Project File Type Settings window showing Language Mapping for Multilingual XML with languages English, German, French, Italian, and Spanish mapped to their respective IDs.

My embedded content process is enabled, for the CDATA.

I am able to preview the text.

When I add my XML file to the Wizard, it is not recognized - Studio wants to put it as Any XML 2. When I disable all other XML options, it comes in as "Reference". I know Paul mentioned that if one thing is wrong, it won't recognize the file type, and that's where I'm at. But I do not know what part is wrong.

If someone can please help, I would appreciate it!

Best, Mindy



Generated Image Alt-Text
[edited by: Trados AI at 6:21 AM (GMT 0) on 29 Feb 2024]
  • You're sort of on the right lines, but do need a little practice at XPath :-)

    Languages Root.  The XML at the start is called the prolog and this just tells the parser which XML version is being used and what the character encoding is.  So the prolog is not included.   The next element is the root.  So for your file you need this:

    /Localization_Messages/M

    Note I didn't include the Lang.  This is because the Lang element in your file contains the translatable content so you need an expression for the languages that uses Lang.  In your file all of your languages use Lang, but each language is defined by an attribute.  So you need to specify the XPath query that locates the translatable content for each language by telling the parser which element and for which attribute. So for the English:

    Lang[@ID='EN']

    The German:

    Lang[@ID='DE']

    And so on.

    For the embedded content, I can't tell wat sort of processor might be needed with your ample so I just set mine to this:

    Trados Studio Project Template Settings showing Embedded Content section with 'Process embedded content using the following processor: Html Embedded Content 5.2.0.0' selected.

    And because your example had a placeholder with the translatable text I set one of those as well:

    Trados Studio Project Template Settings showing Placeholders section with 'Process placeholder patterns' checked and a pattern 'd+' listed.

    Then, when I create my project I see this:

    Trados Studio message box displaying file types with warnings indicated by red exclamation marks next to 'Multilingual XML File Type v 1.0.0.0' and 'Html Embedded Content 5.2.0.0'.

    Hope that makes sense for you.

    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 6:21 AM (GMT 0) on 29 Feb 2024]