Translations not being loaded for mu-plugin and theme
-
Hi all.
For both a mu-plugin and a theme I’m trying to include translations. For the mu-plugin I’m using the
load_muplugin_textdomain
function and for the theme I’m using theload_theme_textdomain
function. I put the mo-files in the/languages
directory in the mu-plugin and theme itself.Though still the translations aren’t being loaded. I dug into the
load_textdomain
function and found out that the mo-files for both the mu-plugin and theme are being added to the$i18n
global. I also checked in theload_textdomain
if the actual mo-files are being found (using thefile_exists
function) by the function. And they are in both cases.When I add the mo-file for the theme in the main-languages directory everything is fine and the translations do work. This isn’t the case for the mo-file for the mu-plugin.
While I was testing this I only had one plugin active called “Classic Editor”. Next to that I’m running WordPress 5.9.
I hope someone can help because I’m clueless about this.
- The topic ‘Translations not being loaded for mu-plugin and theme’ is closed to new replies.