Main menu

FAQ: Why don't the author-provided translations load?

WordPress discourages the shipping of translations inside themes and plugins, but it's still very common and commercial developers can't take advantage of the GlotPress community translations, so have little choice but to provide their own.

If you don't see author-provided translations loading, it could be for a number of reasons which may or may not be related to our plugin:

WordPress prioritizes installed translations

Whether our plugin is enabled or not, WordPress will prioritize system translations over author provided files. i.e. Author translations will only be used if there is no version installed in the global languages directory (WP_LANG_DIR).

Developers must call load_theme_textdomain or load_plugin_textdomain to register their translation files as a fallback. If this isn't done before a translation is requested, the default (source) string will returned instead.

It is possible for developers to write additional code to force their translations to be used. We don't recommend that practice and can't account for what

Tip: Always disable Loco Translate when you run into a problem loading author translations. If the problem persists you can eliminate our plugin as the cause. Mentioning a third party translation plugin will confuse any issue you report to the developer.

Loco Translate custom files

Loco Translate's custom file loader will try to merge your custom files on top of the author translations, unless (as above) system translations are taking priority.

If you see custom translations, but untranslated strings from the same file are not falling back to the author translations, then the merge has failed. There is one known cause for merge failures with author translations, as follows:

If a translation is requested before load_theme_textdomain or load_plugin_textdomain is called, Loco Translate's custom files will get stuck inside WordPress as the fallback path. If load_theme_textdomain or load_plugin_textdomain is called later on with the author's desired fallback, it will be too late. There is currently no known fix for this.

Tip: Always check the author's file would be loaded with Loco Translate disabled. Then check the developers code to see if they register their translation path too late. Timing is everything.

In summary:

  • With system and author translations installed, you will always get the system translations (unless the developer has written code to force their own logic). You can debug this behaviour with Loco Translate disabled.

  • With custom translations installed, Loco Translate will merge them with the author translations if the system file is absent AND the domain was not automatically loaded before the author's path could be registered.

See also

Last updated by