How to translate HTML Files with embedded JSON content

I have some HTML files to translate in my Trados Team/Trados Studio 2024. The HTML files are embedded with some JSON content, the JSON content are enclosed in the <script>...</script> tag pair. However, I need to translate certain fields in the JSON content. 

I am aware that I can translate all JSON content by going to File Type Settings > HTML 5 > Embedded Content > Check the Other elements identified by ... > Parser Rules > Add script as the Parser Rule Name and Parser Rule Condition Path > Select Embedded Content Plain Text v1.0. 

But that brings all the JSON content into the Editor window. I only wanted to translate a few fields from the JSON content, not all of them.

Please suggest.

Thank you.

emoji
Parents Reply Children
  •  

    I vaguely recall seeing this before, it's not a common occurrence in here anyway.  However, you mentioned this:

    I am aware that I can translate all JSON content by going to File Type Settings > HTML 5 > Embedded Content > Check the Other elements identified by ... > Parser Rules > Add script as the Parser Rule Name and Parser Rule Condition Path > Select Embedded Content Plain Text v1.0. 

    But that brings all the JSON content into the Editor window. I only wanted to translate a few fields from the JSON content, not all of them.

    It only brings all the content in if you don't tailor the rules you want within the embedded content processor.  I'd recommend you go into the Embedded Content Processors and copy the default, give a name that makes sense for you, and then tailor the rules so that it will only pick up the parts you want.  Then go back to your HTML filetype and select your now available custom embedded content processor:

    Screenshot of the Options window showing the File Types section. The Embedded Content Processors option is selected on the left panel. On the right, a list of file types is displayed, including Amber, Lingoport_JSON, Microsoft Excel 2007-2019, HTML 5, myCustomAuthor-IT, and Plain Text. The Plain Text row is highlighted, and an arrow points to the Copy button on the right side of the window.

    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: RWS Community AI at 8:51 AM (GMT 0) on 10 Nov 2025]
  •  

    Sorry... I didn't pay attention to the forum you posted into!!

    So same concept, but you'd create a custom filetype and just edit the embedded processor in a window like this:

    Screenshot of the 'Json in HTML' interface showing three file types: Plain Text, Microsoft Excel 2007-2019, and HTML 5, with corresponding IDs and options to Import, Export, Delete, and Revert to default settings.

    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: RWS Community AI at 8:55 AM (GMT 0) on 10 Nov 2025]