Available for projects & agency overflow · Quick reply, from the person who does the work

Untranslated strings on a multilingual WordPress site

A multilingual WordPress site still shows source-language text in places: whether it runs on WPML or Polylang, the cause is never quite the same, and an untranslated string is either missing from the translation tool, or structurally impossible to translate until the code is fixed.

Describe my issue Send a message

How I go about it

  1. Locating the string

    I check whether the string comes from the theme, a WooCommerce extension, or text injected via JavaScript, since each case is handled differently.

  2. Checking the text domain

    I check that load_plugin_textdomain() or load_theme_textdomain() loads the expected /languages folder and points at the text domain declared in the plugin or theme header.

  3. Searching the code

    I check whether the string goes through __(), _e() or esc_html__(). If it’s hard-coded into a template or a PHP file, it was never registered as translatable, whichever tool is used.

  4. Translating or fixing the code

    For a string already registered but untranslated, I add it in WPML String Translation or the Polylang translation editor. For a hard-coded string, I fix the source so it goes through a gettext function.

  5. Checking after an update

    I check that a recent theme or plugin update hasn’t reset custom translations stored in a way that gets overwritten on the next deployment.

What I handle regularly

  • A button, error message or cart text stays in the source language while the rest of the site is translated
  • A string shows up correctly in WPML String Translation but never gets translated on the site
  • Text injected via JavaScript, a validation message or a notification, never goes through translation
  • Custom translations disappeared after a theme or plugin update
  • Adding a new language suddenly reveals a dozen strings that were never translated

Why a string stays untranslated

A multilingual WordPress site usually runs on WPML or Polylang, two plugins that translate strings registered through WordPress’s gettext functions — __(), _e(), esc_html__() — and tied to the theme’s or plugin’s text domain. If a string never shows up in the translation tool, it’s usually because it isn’t structurally translatable: hard-coded into a PHP file or template, without going through gettext.

The second common case: the string does exist as translatable text, but the text domain isn’t loading correctly, for instance because load_plugin_textdomain() is missing or points at the wrong /languages folder. The .po and .mo files exist, but WordPress never looks for them.

WPML’s String Translation module only finds what was properly registered: a string injected via JavaScript, or built by concatenation in PHP rather than passed whole to gettext, routinely gets missed by the scan.

Related pages

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

besoin
etat
constructeur (facultatif)
extensions (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Why do some strings never show up in WPML String Translation?
Because they aren’t registered as translatable in the code: a string hard-coded into a PHP file, or built by concatenation, is never scanned by WPML. The code has to be fixed first so it goes through a gettext function.
I use Polylang rather than WPML, does that change anything?
The principle is the same: both rely on WordPress’s gettext functions and a correctly loaded text domain. Only the translation interface and the storage method differ.
A theme update wiped out translations I’d made, why?
It depends on how the translation plugin stores those strings: some storage methods get overwritten by an update that regenerates the source language files. I check that mechanism before fixing anything.
How long does it take to translate the missing strings?
For strings that are already translatable but untranslated, it’s quick, often a matter of hours. Making hard-coded text translatable depends on how many files and occurrences are involved.
The text shows up translated in preview but not on the live site, why?
That’s often a caching issue: a page cached before the translation was saved keeps showing the old version until the cache is cleared.