Understand registered strings

A registered string is a standalone public value that a theme, plugin, or custom integration explicitly makes available to POM Translate. It is useful for text that has no post, term, menu item, or gettext catalog entry.

Registration identity

Developers register a value with:

pom_translate_register_string(
    'my-plugin/footer-message',
    (string) get_option( 'my_plugin_footer_message', '' )
);

The first argument is a stable product-owned name. Keep it unchanged when the displayed copy changes. The second argument is the current source text.

The helper also accepts the legacy group and multiline arguments for compatibility. They do not create separate groups or editor modes in the current Translation Manager, so integrations should not rely on them for organization.

Display a translated value

Pass the original value—not its registration name—to the translation helper:

$message = (string) get_option( 'my_plugin_footer_message', '' );

echo esc_html( pom_translate__( $message ) );

pom_translate__() resolves the active locale and returns the original text when no translation is available. It can register an unknown value automatically, but explicit registration with a stable name is preferable for settings and predictable administration.

For code that already knows the target locale, pom_translate_translate_string( $value, $locale ) provides the same original-text fallback. Integrations handling REST or AJAX output can use pom_translate_translate_registered_string() when they need lookup without automatic registration.

Escape the returned value for its output context. Use esc_html() for plain text and an appropriate allowlist such as wp_kses_post() only when the setting intentionally supports safe HTML.

Translation lifecycle

Registered values appear under Translations → Other translations. Their locale values use the same translation statuses and review workflow as other database-backed strings.

If the source value changes while its stable name remains the same, POM Translate refreshes the source record and removes the old locale translations. This prevents a translation written for obsolete copy from being shown as current.

For gettext messages with plural forms or message context, use Software translations instead.