How to handle WordPress shortcodes in an XML file with elements containing HTML code

Hi,

For a WordPress / WPML website translation project, we have copied all text for translation to an Excel file, which we have then converted into an XML file using an XML map (I know, I know, but this is due to segmentation issues with WordPress XLIFF files if you are not a WPML partner and therefore don't have access to their segmentation app - see other posts on this community about looooong segments). One of the elements in this XML file contains HTML code. We have created XML file type settings using the HTML embedded content processor to recognise the HTML code in that XML element. So far, so good.

However, this HTML-containing element also contains WordPress shortcodes, such as [contact-form-7 id="2944" title="XXX"] and [vc_row el_class="content"] / [/vc_row]. Is there a way to have Studio recognise the vc_row shortcodes as structure tags, and to translate only the title attribute in the contact-form shortcodes?

I've tried using XPath, but I don't have the required skills or expertise to get this to work...

Thanks,
Lieven

A piece of the XML file:

Screenshot of an XML file opened in Trados Studio with HTML code and WordPress shortcodes visible within the text.

...



Generated Image Alt-Text
[edited by: Trados AI at 4:35 AM (GMT 0) on 5 Mar 2024]
emoji