Participate in save-time extraction
POM Translate extracts source strings when eligible posts, terms, and menu items are saved or explicitly processed. The parser records source text, context, placeholder maps, and a skeleton used to rebuild structured output.
Integration choices
- Register custom post metadata through
pom_translate_translatable_meta_keys. - Register shortcode attributes through
pom_translate_parser_translatable_shortcode_attributes. - Extend HTML parsing through the parser tag and attribute filters.
- Register standalone interface values with
pom_translate_register_string().
Do not create translation rows during the_content, REST response rendering, or another visitor-facing read. Source discovery belongs to an authorized save or maintenance workflow.
Source-change behavior
Stable source text and structural context let existing translations remain useful. When an integration changes a field's source value, wrapper structure, shortcode path, or placeholder arrangement, POM Translate may need to extract a new or updated source record.
Preserve normal WordPress save semantics. Avoid recursive saves, respect revisions and autosaves, and ensure programmatic saves run through the same public hooks as editor saves.
Verify
Save one representative object, find its values in the Translation Manager, translate them, then change only one source field. Confirm the unchanged fields retain their translations and the modified field is presented for review without corrupting the rendered structure.