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:
- The translation file is not up to date.
- The string wasn't extracted from the code.
- 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 might be translated in some places, but perhaps not in all places.
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. The string is either not translatable at all, or it's in the source code in such a way that Loco Translate cannot see it.
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.
It's the author's responsibility to ship properly localized code, and that includes providing a valid and up to date template file containing all the translatable strings. They're not obliged to do any of this, but unfortunately we can't help you if they don't.