Render values in the active language

At read time, POM Translate resolves the locale and filters supported post, term, metadata, menu, URL, and response values. It reconstructs structured content from the stored skeleton and translated strings.

Use the narrowest API

For custom output, prefer:

  • pom_translate_get_post_title(), pom_translate_get_post_content(), or pom_translate_get_post_excerpt();
  • pom_translate_get_term_name() or pom_translate_get_term_description();
  • pom_translate_translate_registered_string() for registered interface text;
  • pom_translate_get_localized_url() for an equivalent route.

These helpers accept or resolve a locale and return safe source fallbacks when no stored translation is available. Escape the returned value for its final HTML, attribute, URL, or JSON context.

Avoid applying the_content or other broad WordPress filters manually to arbitrary strings. Those filters depend on global query state and can translate, expand, or cache the wrong object.

No frontend writes

Read-time helpers retrieve existing data; they should not be used as a mechanism to register new values or trigger machine translation. Register sources during initialization or save-time work.

Test the same component under two explicit locale URLs and then in a base-language request. Confirm no request-local value or cache entry leaks from one language to another.