What the content skeleton represents
The content skeleton is POM Translate’s saved structural representation of a post body. It keeps the source layout in order while marking the positions where translated content, attributes, and shortcode values can be inserted.
It is not a second translated copy of the post and it is not an editor-facing HTML template.
Structure and language have different owners
Consider a simple source body:
<h2>Opening hours</h2>
<p>Visit our <strong>city restaurant</strong>.</p>
The heading and paragraph contain translatable language. The heading element, paragraph element, emphasis element, and their order belong to the source structure.
During extraction, POM Translate stores the linguistic units separately and leaves position tokens in the skeleton. Inline markup inside a unit becomes protected markers associated with that unit. At render time, the plugin resolves the tokens for the selected locale and restores the protected markup.
The skeleton preserves order
Translation rows can be loaded, filtered, or stored independently from the original HTML sequence. The skeleton provides the order in which their resolved values belong.
Different token families distinguish:
- body content units;
- translatable HTML attributes;
- supported shortcode attributes or inner values.
These tokens are implementation markers, not text for editors to translate. A complete render must replace every expected skeleton token before the result can be used.
One skeleton supports several locales
The structural source is shared. POM Translate does not save one complete HTML document for English, another for French, and another for German.
For each target request, it combines the same current skeleton with that locale’s translation map. This produces two useful behaviors:
- changing a translation does not rewrite the source post body;
- an empty target value can be replaced with the corresponding source unit without losing its position.
The tradeoff is that the source layout remains authoritative. Translators can reorder words and protected inline elements inside a unit, but they do not rearrange the post’s block or container structure from the translation table.
Skeleton version protects compatibility
POM Translate records a parser version with the skeleton. The renderer checks that the stored representation is compatible with the version it expects.
If the skeleton is absent, incompatible, or still contains unresolved tokens after replacement, POM Translate does not send broken token markup to the visitor. It abandons that reconstructed result so the normal source content path can remain available.
Saving the canonical post again regenerates the current representation. This is the appropriate first step after an update changes parser behavior or when an old post has never been processed by the current version.
The skeleton is not the placeholder map
These two concepts solve different problems:
| Mechanism | Purpose |
|---|---|
| Content skeleton | Preserves the order and surrounding structure of body units, attributes, and shortcode values |
| Protected marker map | Preserves supported inline markup inside one translation unit |
The skeleton knows where a paragraph belongs. The placeholder map knows where the paragraph’s link, emphasis, image, or inline span belongs.
Verify the concept safely
Use a post with two paragraphs and one formatted phrase:
- save the source post;
- translate only the first paragraph;
- open the target route;
- confirm the first paragraph is translated;
- confirm the second paragraph falls back to source in the correct position;
- confirm the formatted phrase keeps its source markup;
- reorder the paragraphs in the source editor and save again;
- verify the target route follows the new source order.
This proves that translated values and structural order are separate. Continue with How the skeleton is regenerated after a save for the lifecycle that keeps the representation current.