Make structured content translatable
POM Translate separates human-readable text from markup by storing a skeleton and protected placeholder map. Integrations should expose textual leaves without treating an entire serialized structure as prose.
For HTML, parser filters can extend container tags, inline tags, translatable attributes, and skipped tags. For post metadata, register the exact keys whose values are public translatable content. For shortcode content, declare supported attributes by shortcode tag.
Keep these values out of translation:
- IDs, booleans, enum keys, hashes, and timestamps;
- CSS classes, selectors, and data-control attributes;
- URLs that belong to the localized URL system;
- executable code and serialized implementation metadata;
- customer, account, or order-specific data.
Protected inline markers must remain paired and unchanged. POM Translate rejects stored or machine-generated translations that break the placeholder contract.
When a structured value has its own schema, write a focused adapter that extracts known text fields and rebuilds the same schema. Do not recursively translate every string in an unknown JSON object.
Test nested formatting, repeated text, empty values, reordered components, and a source edit. The translated result must preserve the exact non-text structure and fall back cleanly for missing leaves.