Why Your Loco Translate Custom Translations Aren't Working: A Troubleshooting Guide
Content
If you've used Loco Translate to create custom translation files only to find that WordPress isn't loading them, you're not alone. This is one of the most common issues users encounter. This guide will explain why this happens and walk you through the most effective solutions.
The Core Problem: WordPress's Translation Loading Order
WordPress loads translation files in a specific hierarchy. It prioritizes files in certain locations, and if it finds a translation in a higher-priority location, it will use that and ignore your custom file. This is often the root cause of the issue.
The typical loading order is:
- WordPress.org Language Packs (if the theme/plugin is from the official directory)
- System folder (
wp-content/languages/) - Custom folder (
wp-content/languages/loco/) - Author folder (inside the theme/plugin's own
/languages/directory)
As you can see, your custom files in the 'Author' location have the lowest priority. If an update adds a community translation to the System folder or a language pack is installed, it will override your work.
Common Scenarios and Their Solutions
1. Theme or Plugin Update Overwrote Your Files
Why it happens: You saved your .po and .mo files in the theme or plugin's own /languages/ folder (the "Author" location). When the software updated, it deleted that entire folder and replaced it with a new one, wiping out your translations.
The solution: Never save translations in the Author location for this exact reason. Always use the "Custom" location (wp-content/languages/loco/). This folder is safe from updates. If your files were lost, you may need to re-create them in the Custom location.
2. A Community Translation is Overriding Yours
Why it happens: WordPress automatically downloads language packs for themes and plugins from WordPress.org. These packs are saved in the System folder (wp-content/languages/plugins/ or wp-content/languages/themes/), which has a higher priority than your Custom folder.
The solution: You have two options:
- Option A (Recommended): Keep your translations in the Custom folder. The System translations will load first for any strings they contain, and your Custom files will fill in the gaps for any missing or different translations. This is the intended behavior.
- Option B: If you must have complete control and want to disable the community translation entirely, you can delete the corresponding
.poand.mofiles from the System folder. Be aware they may be re-downloaded by WordPress in the future.
3. The "Sync" Function Isn't Finding New Strings
Why it happens: The Sync operation compares your translation file against a Template file (.pot). If your template is missing the new strings from your source code, Sync has nothing to compare against.
The solution: Ensure your bundle is configured with the correct Template file. You may need to re-generate the .pot template from your source code to pull in all the newest strings before running Sync on your translation file.
4. Translations Using _x() Aren't Appearing
Why it happens: The _x() function includes a "context" parameter. In your .po file, these strings will have a special context field. If the context in the code doesn't perfectly match the context in the translation file, the translation will not be used.
The solution: In the Loco Translate editor, make sure you are viewing and translating the correct contextualized string. It will appear differently from a standard string without context.
Final Checklist
- ✅ Are your custom translation files saved in the Custom location (
wp-content/languages/loco/)? - ✅ Have you checked the System folder for conflicting language packs?
- ✅ Have you regenerated your POT template and synced your PO file after adding new strings to your code?
- ✅ Are you correctly translating contextualized strings (with _x())?
Understanding WordPress's translation hierarchy is the key to resolving most issues with Loco Translate. By saving your files in the correct, safe location and knowing what might override them, you can take full control of your website's translations.
Related Support Threads Support
-
export translation language filehttps://wordpress.org/support/topic/export-translation-language-file/
-
translation issue for strings inside the functionhttps://wordpress.org/support/topic/translation-issue-for-strings-inside-the-function/
-
Different translationshttps://wordpress.org/support/topic/different-translations/
-
Can I add 9 new languages in theme translation?https://wordpress.org/support/topic/can-i-add-new-languages-in-theme-translation/
-
source of templatehttps://wordpress.org/support/topic/source-of-template/
-
Thousand separator not displayed correctly in Bulgarianhttps://wordpress.org/support/topic/thousand-separator-not-displayed-correctly-in-bulgarian/
-
Mailpoet translated strings not appearing in the correct languagehttps://wordpress.org/support/topic/mailpoet-translated-strings-not-appearing-in-the-correct-language/
-
FLAGS does not match in my LOCO Installed pagehttps://wordpress.org/support/topic/flags-does-not-match-in-my-loco-installed-page/
-
Extract strings from blade templateshttps://wordpress.org/support/topic/extract-strings-from-blade-templates/
-
Issue with a translationhttps://wordpress.org/support/topic/issue-with-a-translation/
-
Extracting gettext strings not in a pluginhttps://wordpress.org/support/topic/extracting-gettext-strings-not-in-a-plugin/
-
Found only 4 strings (plugin name)https://wordpress.org/support/topic/found-only-4-strings-plugin-name/
-
Translations don’t waterfallhttps://wordpress.org/support/topic/translations-dont-waterfall/
-
Two strings in upload.php are not translation-readyhttps://wordpress.org/support/topic/two-strings-in-upload-php-are-not-translation-ready/
-
Order of strings in POT filehttps://wordpress.org/support/topic/order-of-strings-in-pot-file/
-
the author’s translation instead of the system one or merge these files togehttps://wordpress.org/support/topic/the-authors-translation-instead-of-the-system-one-or-merge-these-files-toge/
-
some translate not working when po in Author pathhttps://wordpress.org/support/topic/some-translate-not-working-when-po-in-author-path/
-
Please, make all strings in /tpl/admin/help translatablehttps://wordpress.org/support/topic/please-make-all-strings-in-tpl-admin-help-translatable/
-
Preserver manually added string into templatehttps://wordpress.org/support/topic/preserver-manually-added-string-into-template/
-
Source of my template file is wronghttps://wordpress.org/support/topic/source-of-my-template-file-is-wrong/
-
Translations with function _x()https://wordpress.org/support/topic/translations-with-function-_x/
-
Some sentences are not transpatethttps://wordpress.org/support/topic/some-sentences-are-not-transpatet/
-
Loco doesn’t detect texthttps://wordpress.org/support/topic/loco-doesnt-detect-text/
-
Translation doesn’t work.https://wordpress.org/support/topic/translation-doesnt-work-45/
-
time passed translation functionhttps://wordpress.org/support/topic/time-passed-translation-function/
-
Translates don’t pointed to custom fileshttps://wordpress.org/support/topic/translates-dont-pointed-to-custom-files/
-
.pot locationhttps://wordpress.org/support/topic/pot-location/
-
The number of translated entries does not match the actual number of entrieshttps://wordpress.org/support/topic/the-number-of-translated-entries-does-not-match-the-actual-number-of-entries/
-
Issues with translationshttps://wordpress.org/support/topic/issues-with-translations/
-
error importing PO filehttps://wordpress.org/support/topic/error-importing-po-file/
-
Plugin translation not detected in .pot filehttps://wordpress.org/support/topic/plugin-translation-not-detected-in-pot-file/
-
Missing string to translatehttps://wordpress.org/support/topic/missing-string-to-translate-2/
-
Problem with translating Divihttps://wordpress.org/support/topic/problem-with-translating-divi/
-
Don’t include new strings in po filehttps://wordpress.org/support/topic/dont-include-new-strings-in-pot-file/
-
Does not translate .php file based stringshttps://wordpress.org/support/topic/does-not-translate-php-file-based-strings/
-
standalone .mo file translation, to save a lot of space, please.https://wordpress.org/support/topic/standalone-mo-file-translation-to-save-a-lot-of-space-please/
-
BuddyPress: two menu items not translatedhttps://wordpress.org/support/topic/buddypress-two-menu-items-not-translated/