WordPress translation not working

PlatformWordPress Doing it yourself30 to 90 minutes Checked

The short answer

There are two kinds of text on a WordPress site. Theme and plugin text is translated through language files, and your own content is translated with a multilingual plugin. Text stays in English when the language file is missing, when your custom translation was saved where an update overwrites it, or when the words are content, not interface text.

Is this your problem?

  • Buttons, labels or emails stay in English
  • Your translations disappear after a plugin update
  • Page-builder text will not translate
  • The language switcher shows the wrong page
  • Visitors see the wrong language from the cache

What usually causes it

1
The language file is missing

How to tell: The site language is set, but the plugin or theme has no translation for it yet.

2
Custom translations saved inside the plugin folder

How to tell: Your changes vanish every time the plugin updates.

3
The text is content, not interface text

How to tell: Headings and paragraphs you typed in the editor or the page builder.

4
The theme hard-codes the words

How to tell: The text is typed straight into theme files, so it cannot be translated.

5
A cache serving one language to everyone

How to tell: The wrong language shows until the cache is cleared.

Before you touch anything

  • Back up the wp-content/languages folder.

How to fix it, step by step

  1. 1

    Set the language and fetch files

    In Settings, General, choose the site language. Then Dashboard, Updates, and press Update Translations.

  2. 2

    Save custom translations in a safe place

    In Loco Translate, choose the Custom location, which lives in wp-content/languages/loco. Translations saved in the plugin folder are overwritten on update.

  3. 3

    Translate content in the multilingual plugin

    Pages, posts and page-builder sections are content. Translate them in WPML or Polylang, which create one copy per language.

  4. 4

    Scan strings in WPML

    In WPML, Theme and plugins localization, scan the theme and plugins. Then translate the found text in String Translation.

  5. 5

    Find hard-coded words

    Search the theme for the English text. If it is not wrapped in a translation function, a developer needs to wrap it, in a child theme.

    echo esc_html__( "Read more", "your-theme" );
  6. 6

    Make the cache aware of language

    Set the caching plugin to keep a separate copy per language, then clear it.

Stop and get help if

  • The theme is full of hard-coded text and has no child theme.
  • Translations were lost in an update and there is no backup.
Fix it for me

Stop it happening again

  • Keep custom translations in the Custom location.
  • Use a child theme for any theme change.
  • Check each language after updates.

Questions people ask

WPML or Polylang?

Both work. WPML is broader for shops and page builders. Polylang is lighter and has a free version. Pick one and stay with it.

Can I use machine translation?

For a first draft, yes. Have a person check the pages customers read before buying.

Still broken? We can fix it.