Skip to content

Theme strings (_e, __, _x)

The plugin hooks WordPress gettext filters so theme and plugin strings can be translated from the CMS.

Supported functions

  • __()
  • _e() / esc_html_e()
  • _x() / _ex() (with context)

How it works

  1. Frontend renders a page in the default language
  2. Each gettext string is auto-registered when it appears on the page
  3. You translate them under Translations → Theme / _e()
  4. On /en/... (or another prefix), visitors see your CMS translation

Default language still uses normal WordPress .mo files when present.

Gutenberg vs PHP strings

SourceWhere to translate
Gutenberg block text in the editorGutenberg blocks
PHP theme labels (_e('Read more', 'my-theme'))Theme / _e() tab

WP Clinic Translator