Let’s take a look at the approaches you can take to maintain the original structure of your rich text elements in the translated texts.
Rich text elements might contain images, linked items, components, and formatted text. You need to convert the rich text elements into a format that preserves the information about the position of linked items or images used in the rich text.Also, make sure to transform the translation unit into a format supported by your TMS, for example, JSON or XLIFF.
A. Insert placeholders in the rich text content
Insert placeholders that are not supposed to be translated into the text and then use the placeholders to insert the references back into the translated text.
Easy to implement.
Content from the rich text element remains as one piece of text in the TMS.
Some translation management systems might not support placeholders in the text sent for translation.
B. Split the rich text using references
Split the rich text using references into text chunks and encode the references that should be between them as translation keys or metadata of those chunks.
Doesn’t require special placeholders in the text.
More challenging to implement than placeholders.
The rich text element is split into multiple chunks, which might be more difficult to translate for the TMS, especially for human translators.
Read content from the CMS and import it
Pick the right Kontent.ai API for reading the content you want to use for translation.