How to make only a specific content translatable in Trados 2019 Professional?

Hello, does anyone have any idea how to make a word: "network" translatable in Trados?

<meta name="search-keywords" content="network"/>

I tried to create a condition for "meta" element, but it didn't work properly. I must have done something wrong. When I made "content" translatable, I got also all other meta data translatable in Trados which I'd rather avoid. Is there a way to make it more specific?

Parents
  • This word is within the "attribute".  Attributes are typically not translated so if you need to translate one you must specify the rule to extract the content from the content attribute.  If you only want the content attribute when it's part of the meta element then you need a rule something like this:

    //meta/@content

    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

  • Hi @Paul, thank you for your quick answer. I didn't use Regex, but I made the content of the "content" attribute within the meta element translatable in the Parser of HTML5. In this way all meta content became translatable, which wasn't my intention. Please take a look at other examples, which as a result were extracted for translation in Trados:

    <meta name="generator" content="Adobe RoboHelp 2020" />
    <meta name="Originator" content="ImportMif" />
    <meta name="OriginalFile" content="C:\(...).fm" />
    <meta name="search-keywords" content="network" />

    That's why I was wondering is there a way to make the content attribute translatable only if it's paired with the "search-keywords" within the meta element, but probably it's just my wishful thinking. Should I otherwise advise the content creators to place search keywords as a plain text, not within attributes? What would you recommend? I'm in contact with them, so I'm pretty sure they will be also willing to help.

Reply
  • Hi @Paul, thank you for your quick answer. I didn't use Regex, but I made the content of the "content" attribute within the meta element translatable in the Parser of HTML5. In this way all meta content became translatable, which wasn't my intention. Please take a look at other examples, which as a result were extracted for translation in Trados:

    <meta name="generator" content="Adobe RoboHelp 2020" />
    <meta name="Originator" content="ImportMif" />
    <meta name="OriginalFile" content="C:\(...).fm" />
    <meta name="search-keywords" content="network" />

    That's why I was wondering is there a way to make the content attribute translatable only if it's paired with the "search-keywords" within the meta element, but probably it's just my wishful thinking. Should I otherwise advise the content creators to place search keywords as a plain text, not within attributes? What would you recommend? I'm in contact with them, so I'm pretty sure they will be also willing to help.

Children