How translations are associated with source content
POM Translate stores a target value against a specific discovered source unit and locale. It does not attach a free-floating translation to every occurrence of a similar phrase, and it does not store a second complete post for the target language.
A source unit has a precise identity
An extracted value belongs to:
- a subject type, such as a post, term, menu item, or supported metadata;
- the canonical WordPress object ID;
- a field, such as a title, excerpt, body, attribute, or menu label;
- a stable position or key within that field;
- the current exact source text;
- any protected inline-marker definition.
The target translation then adds:
- the locale;
- translated text;
- a workflow status.
This model allows the same sentence to appear in two different parts of a site without making their editorial ownership ambiguous.
Locale is part of the association
A French translation and a German translation of the same source row are independent values. Updating one does not overwrite the other.
The base locale is not stored as another target translation. Its text comes from the canonical WordPress object. This is why source corrections belong in the post, term, menu, or setting that owns the original value.
Status describes the translation workflow
The translation table uses four public statuses:
| Status | Meaning |
|---|---|
| Pending | The target value is empty or still requires translation |
| Machine | The stored draft came from machine translation |
| Human | A user saved a non-empty manual translation |
| Reviewed | An editor explicitly marked the translation as reviewed |
Status is editorial metadata. Rendering primarily depends on whether a non-empty, structurally valid target value exists. A machine translation can therefore be visible before linguistic review if the site publishes that route.
Source changes protect against stale text
When a saved source unit changes in place, POM Translate removes translations associated with the previous exact definition. It does not quietly display an old translation under a new source sentence.
After storing the new source value, the plugin looks for an existing non-empty translation with the same normalized hash and exact original text. This exact-match reuse can restore a known translation when identical copy reappears elsewhere or at another stable location.
Similarity is not enough. Punctuation, markup, or wording changes can alter meaning and placeholder expectations, so editors should review any row returned to Pending.
Empty values use source fallback
An empty target value is not stored as translated prose. During rendering, POM Translate uses the source value for that row.
This fallback is local to the missing value. A page can contain:
- a translated title;
- a source-language excerpt;
- translated body paragraphs;
- one source-language image attribute.
Use completion and review tools to prevent unintended mixed-language publication.
Separate stores serve separate surfaces
Not every localized value uses the ordinary content-row association:
- post and term slugs use the localized URL map;
- supported custom URL replacements use their own source and locale mapping;
- registered application strings have stable registered names;
- gettext software translations are managed as WordPress catalog files.
This separation avoids treating URLs, application identifiers, and software catalogs as interchangeable body prose.
Cache invalidation follows successful writes
After a target value is saved, POM Translate clears the relevant translation lookup and emits a translation-change event. The runtime then invalidates affected rendered post content, metadata, or menu caches according to the source subject.
This refreshes POM Translate’s own cached output. A full-page cache or CDN may still hold a complete older response and requires its own invalidation policy.
Verify associations without inspecting storage internals
- Translate the same short phrase in two different posts with different wording.
- Update only one translation.
- Confirm the other post remains unchanged.
- Add a second target locale and translate the first post differently.
- Confirm each locale retains its own value.
- Change the source sentence and save the post.
- Confirm the affected row returns for review while unrelated rows remain complete.
- Clear the translation and verify source fallback on that locale’s public route.
These checks prove the behavior that matters to editors without exposing or modifying the plugin’s internal storage.