Main menu

Individual string problems

FAQ: Why can't I translate these specific words?

You may find to your annoyance that just a handful of phrases on your site stay in English, even though the majority are translated.

If none of the translations from an entire file are showing up, you probably have an entirely different problem - see this FAQ instead.

There are many possible causes for individual strings staying in English even when your translation files appear to be loaded. Please work through the following steps before reporting your problem as a fault with Loco Translate.

Step 1 - Establish the source

The first thing to do is establish for certain which bundle the strings belong to. They will either be in the WordPress core, your theme, or one of your plugins. But don't jump to conclusions.

If you know for certain you've identified the correct bundle containing the strings, then skip to step 2, BUT check first whether any of the strings are in multiple places. You may have to work out which copy is the one actually being used.

If you can't find the strings in any translation files, contact the author of your theme and ask them if they're translatable. It could be a mistake, or there may be some other way you're supposed to translate them.

If you still don't know where the mysterious English words come from then we're not going to be able to help you any further. See the final paragraph.

Step 2 - Establish the string is translated

At this stage you know which bundle is responsible for the strings and you know a translation file exists for it. Locate the file in Loco Translate and open the editor view for your language. Now establish if the English text is present. If it is, then skip to step 3.

No, the string is not present

If you don't see the English text in the editor there are several possible reasons:

  1. The translation file is not up to date.
  2. The string wasn't extracted from the code.
  3. The string is not translatable at all.

Your next course of action is to use Loco Translate's Sync button found above the editor. The success of this operation depends on whether the author has provided a valid translations template or (failing that) whether Loco can extract strings directly from the source code.

Nope, sync didn't work.

If syncing didn't add the missing string into the editor then you're entering developer territory. If you want to solve this problem yourself then read about working with templates. If you still can't get the string to appear in the editor, see the final paragraph.

Step 3 - The string is present and translated

At this stage you know the string is in the translation file, you've translated and saved it, and [critically] you know the translation file is being loaded because other translations are displaying from the same file. So why do these specific words still display in English?

Check the text is identical

Check the English text in the editor in is exactly the same as the text on your site. If the text on your site is "Welcome", a translation of the string "welcome" will not display. Check spacing and HTML differences too: Your site may display "Next ยป" on screen, but the actual string could be "Next » ".

Bear in mind that some themes use CSS to transform text in stylistic ways. You may see "NEXT" on screen, but the string might actually be "Next". The only way to be sure is to look at the theme's PHP code.

If a string you've translated doesn't exactly match the source text, then follow the same procedure as if the string was NOT present.

Check for context variations

PO files allow an additional string to disambiguate identical English texts. This allows you to have an entry like "Help" [nav button] and another like "Help" [page title]. So check for multiple versions of the same string and make sure you translate them all.

Check for source code errors

Although the string is there, there could still be an error in the code. We can't provide help with coding problems, but here are a few hints if you decide to investigate the issue yourself:

  • A particular string could be translated too early (before translations are loaded).
  • The translate function does not have the correct arguments (text domain typos are common).
  • The exact string could have changed slightly, meaning the translation file is out of date.
  • The text could be rendered by JavaScript and the author has not localized their scripts.
  • The text might be translated in some places, but perhaps not in all places.

Check the string isn't stored in the database

Some plugins and themes allow you to configure custom strings via their admin pages or customizer interfaces. In such cases the string will be saved to your database as a WordPress site option. From then on it will be pulled from the database and your translation file will no longer be consulted. Switching language will likely make no difference to the display of this text and there will be nothing Loco Translate can do about it. See Translating database content.

Ask the author whether your specific string is pulled from a site option or taxonomy, or some other database value.

Check whether the string is loaded from a JSON file

In addition to PO/MO files, WordPress has a translations system for JavaScript which loads its translations from JSON files. (See wp_set_script_translations). Loco Translate generates JSON language packs since version 2.5, but many things can go wrong with this. See the notes and caveats.

Ask the author whether your specific string is pulled from a JSON file or loaded by JavaScript, and whether Loco Translate is generating the correctly named file.

Dead end

You've tried every suggestion on this page and you still see English text even though you know your translation files are being loaded by WordPress and you know Loco Translate has saved your string to disk.

The best thing to do at this stage is contact the bundle author. Solving this yourself can get very technical and the solution will most likely require modification to the theme or plugin files. That's never recommended because your changes will be lost when you next update WordPress.

Please don't ask us why a particular translation is not showing up. There is no support for this problem unless you can demonstrate the fault is with Loco Translate. We will investigate any reproducible bug, but this requires you post steps to reliably demonstrate the fault in a way that we can see it too.

Last updated by