Translate public settings values

A public setting is text saved by a site owner and displayed to visitors, such as a footer message or a configurable call-to-action. It is not automatically translatable merely because WordPress stores it as an option. The theme or plugin that owns it must register and resolve it through POM Translate.

For site owners and translators

  1. Save the original value in the theme or plugin settings screen.
  2. Load the public feature once if the integration registers values when it runs.
  3. Go to Translations → Other translations.
  4. Choose the target locale.
  5. Search for the original value or its registered name.
  6. Enter the translation and select Save translations.
  7. Open the target-language page and verify the result.

Changing the setting's original text can invalidate its existing translations. Return to Other translations after every source-copy change and provide new locale values.

Integration requirement

The owning code should use one stable name for the setting:

$label = (string) get_option( 'my_plugin_public_label', '' );

pom_translate_register_string( 'my-plugin/public-label', $label );

When rendering, it should resolve the same original value:

echo esc_html( pom_translate__( $label ) );

The stable name identifies the setting across source edits. Do not build it from the visible copy, the current locale, or a translated value.

Use output escaping that matches the setting. Plain labels should be escaped as text. Settings designed to contain limited markup should be rendered with the product's documented HTML allowlist.

What not to register

Do not use this workflow for:

  • post, term, menu, or supported custom-field content;
  • fixed source-code messages already using gettext;
  • private configuration values, secrets, URLs used only as technical data, or administrator-only controls;
  • values containing request-specific customer or order data.

Expected result

The option remains a single source value in its owning product. POM Translate stores only the locale variants and returns the original when a translation is missing, so the feature remains usable while translations are being completed.