Kontent.ai: Remembering context for Rich Text fields in content items

Introduction

XTM Connect – Kontent.ai offers an option to change the logic for building a source file, in terms of submitting content in the Rich Text content element.

This option is activated at the level of a particular Kontent.ai project. To activate it, log in to the Kentico Kontent administrator panel, go to Kontent.ai Projects → (edit a relevant project) → Remember context for Rich text fields.

IMPORTANT!

Keep in mind that you first need to select Rich text from the Content elements section so that the Remember context for Rich text fields option is displayed.


How does the option work?

As already mentioned, you can use the Remember context for Rich text fields option to change the default logic for building a source file, with regard to Rich Text fields.

Option deselected

If you deselect this option, content that has been submitted for translation in XTM Cloud is inserted in a source file in a module-based order, which is not the actual order within the value field in the Rich Text body. In other words, in XTM Workbench, the system first picks the field’s text content (object), and then adds the content of the entries referenced in the field (object’s references). This is one way to pass all of the content for translation, but does not retain the context in which the content appears in Kontent AI.

This is an example content item, showing this, in Kontent.ai:

This is what it will look like in XTM Workbench if the Remember context for Rich text fields option is deselected:

As you can see, objects are first displayed in the editor (in the sequence in which they appear in Kontent.ai). The content in the object references is displayed below all the objects (in the sequence in which it appears in Kontent.ai).

Option selected

If you select this option, the context for the objects in the source file submitted for translation in XTM Cloud is kept the same with the actual sequence in which it is displayed in Kontent.ai.

This is an example content item, showing this, in Kontent.ai:

This is what it will look like in XTM Workbench, if the Remember context for Rich text fields option is selected:

As you can see, the content of each object reference is displayed right beneath the object it is actually referring to. In this case, the file contents are in exactly the same sequence as in Kontent.ai.


Propagate repeat translations

The Propagate repeat translations option becomes active once the Remember context for Rich text fields option is selected. You can use it to enable the display of repeated references in XTM Workbench.

Option deselected

If you deselect the Propagate repeat translations option, repetitions of object references are not displayed in XTM Workbench.

This is an example content item, showing this, in Kontent.ai:

This is what it will look like in XTM Workbench, if the Propagate repeat translations option is deselected:

As you can see, the object’s reference appears twice in Kontent.ai but it is only displayed once in the editor.

Option selected

If you select the Propagate repeat translations option, repetitions of object references are displayed in XTM Workbench.

This is an example content item, showing this, in Kontent.ai:

This is what it will look like in XTM Workbench, if the Propagate repeat translations option is selected:

As you can see, the object reference appears twice in Kontent.ai and is also displayed twice in the editor.

Propagating the first translation

If the Propagate repeat translations option is selected, it has another effect: the translation of the first occurrence of an object’s reference in the source file is then applied to all of its repetitions, in a translated version of a particular content item, in Kontent.ai, regardless of different translations in XTM Workbench.

This shows an example of the translations in XTM Workbench:

When the translation of a content item of this kind is finished in XTM Cloud, and reimported to Kontent.ai, the translation of the first repetition occurrence will override the translation of the second occurrence.