• Cheat sheets
  • Documentation
  • API reference
  • Product updates
  • Sign in
Kontent.ai Learn
  • Try Kontent.ai
  • Plan
  • Set up
  • Model
  • Develop
  • Create
Copyright © 2024 Kontent.ai. All rights reserved.
  • Web
  • Privacy policy
  • Cookies policy
  • Consent settings
  • Security
  • GDPR
  • Overview
  • Manage API keys
  • Hello World
  • Hello Web Spotlight
  • Try sample apps
  • Build apps
  • Decide navigation and URLs
  • Environments
    • Overview
    • Integrate search
    • Translation management systems
      • Content flow
      • Define triggers
      • Define translation units
      • Transform and translate
      • Read and import
    • Automate content updates with webhooks
    • PDFs and other formats
  • Get Developer Certification

Transform and translate content

Jiri Lojda, Ondrej Chrastina
3 minutes
Download PDF
0% complete
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.
➕ Advantages➖ Disadvantages
  • 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.
For example, you can use a slight modification of XPath to encode a place of each text chunk in a JSON and use an empty string as a value for keys pointing to a reference.
➕ Advantages➖ Disadvantages
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.