Payload content artifacts

Translate selected Payload CMS fields and supported Lexical text while retaining the structure used for provider writeback.

A Payload page combines readable content with IDs, relationships, uploads, and editor structure. The integration first selects localized fields and composes an artifact for translation. The payload handler then translates supported plain values and Lexical text inside that artifact.

Use the Payload integration to select content and write it back. Submitting an unfiltered CMS record directly bypasses the provider's field selection and can include data that was never intended for translation.

Selected fields and rich text #

A selected-field artifact can contain a title and a Lexical tree:

json
{
  "title": "Delivery options",
  "body": {
    "root": {
      "type": "root",
      "children": [
        {
          "type": "paragraph",
          "children": [{ "type": "text", "text": "Choose your delivery method.", "format": 0 }]
        }
      ]
    }
  }
}

The title and supported text content are translation material. Lexical node types, formatting data, and supported inline structure guide reconstruction. Link destinations, uploads, relationships, and structural block fields do not become prose merely because they contain strings. Selected localized text inside supported block fields can still be translated after provider-side filtering.

Within Lexical, supported text runs preserve formatting and inline structure. Custom nodes need inspection against the supported representation; Lexical support does not extend to an arbitrary editor's document tree.

Matching source and target #

Source and target field paths identify corresponding values. When an existing target is supplied without a previous source, the handler adopts present matching target values and translates gaps. It does not overwrite every existing localized field merely because this is the first recorded sync.

With a previous source, changed source units and missing target values need work. An existing CMS document can be partially translated, so its presence is not proof of completeness. Reconstruction starts from the selected source artifact and inserts supported translated or retained values; it serializes JSON rather than preserving source bytes.

Rich-text alignment needs inspection after edits. A changed paragraph structure or custom node can affect correspondence even when some words remain the same. Verify the resulting CMS field and rendered content, not only the artifact's validity.

Connect selection to writeback #

The Payload integration supplies schema selection, locale reads, connection setup, and writeback. The Payload CMS package documents plugin exports. Keep those provider steps around the artifact handler so the selected fields return to the correct document and locale.

After writeback, open the localized CMS document and inspect both plain fields and rich text. Follow links, check embedded relationships, and compare the target's field coverage with the source selection. Artifact reconstruction does not grant provider write permission or decide whether the content is ready to publish.