Inicio - Documentación - POM AI - 05 Translation - Preserve formatting during translation

Preserve formatting during translation

POM AI does not hand your page builder markup to a translator and hope. It extracts the translatable strings, replaces them with placeholders, translates the strings, and puts them back. This page explains what that protects and where it stops.

How content is broken up

Before translation, POM AI walks the post content looking for shortcodes. For each one it finds, it extracts only the attributes the shortcode itself declares as translatable, leaving everything else — the shortcode names, the layout attributes, the IDs, the nesting — untouched.

Text that is not inside a shortcode is handled as its own translatable chunk. Nested shortcodes are processed recursively, so content inside a column inside a row is reached.

Raw HTML blocks are decoded before translation and re-encoded afterwards, so the markup survives the round trip.

Each extracted string is swapped for a numbered placeholder, and after translation the translated strings are written back into the same positions.

What this protects

  • Shortcode names and structure.
  • Layout attributes: widths, alignments, colours, spacing, CSS classes.
  • Element IDs and anchors.
  • Nesting and ordering of builder sections.
  • Non-translatable attributes of any kind.
  • HTML inside raw blocks.

The practical result is that a page built with a visual builder comes back with the same layout and translated text in it.

What depends on the builder

The extraction relies on the builder declaring which of its attributes are translatable. Attributes it does not declare are left in the source language.

If you find a heading or a button label that never gets translated, that is almost always the cause: the builder does not mark that attribute as translatable. The fix is on the builder side, not in POM AI.

Internal links

Links in translated content are examined: when a link points to a post or page on this site and that item has a translation in the target language, the link is rewritten to point at the translated version.

Links that cannot be resolved this way are left exactly as they are. That includes:

  • links to items with no translation yet;
  • links to external sites;
  • links written as raw text rather than as anchors;
  • links inside attributes the builder does not expose.

This is a good argument for translating in dependency order — translate the pages that get linked to before the pages that link to them, and the rewriting works on more of them. If you translate in the other order, re-check the links afterwards.

What is copied rather than translated

The excerpt. It is carried over from the source unchanged. If your theme, feeds or search results use excerpts, translate them by hand or with the paragraph assistant.

Media. Attachments are not translated and not duplicated. The translated post references the same images, with the same alternative text, in the source language. Translating alt text is a separate manual job; the image metadata tool can regenerate it on the translated site's terms.

Structural properties. Author, dates, status, parent, menu order, comment settings and password are copied deliberately, so the translation behaves like the original.

Custom fields the theme does not mark as translatable. Those are copied as-is.

The slug

The translated post's slug is derived from the translated title, not copied from the source. For hierarchical content, the translation is attached to the translated parent when one exists.

Check slugs on anything with SEO value; a derived slug is rarely the one you would have chosen.

What to verify after translating

Even with placeholder protection, check:

  • Layout renders correctly on the front end, not just in the editor.
  • Buttons and headings inside builder elements actually changed language.
  • Links point where they should, especially in nested elements.
  • Text expansion has not broken anything. Translations into German or Spanish commonly run 15–30% longer than English, which overflows fixed-height sections, buttons and navigation.
  • Special characters and quotes display correctly.
  • Anything that looked like a placeholder in the source survived.

That last one is worth a moment: if your source content legitimately contains text resembling a placeholder token, the round trip can be confused by it. It is rare, but it produces a visible artefact in the output rather than a silent error.

Reducing risk on a complex site

  • Translate one representative page of each template before running a batch.
  • View each translated template on the front end, on desktop and mobile.
  • Prefer translating a page whose linked destinations already exist.
  • Keep a note of any builder attribute that never translates, so your reviewers know to fix it manually every time.