Hi, I realised the translations were not working, and after some investigation I discovered that plugin's translations should not be loaded during the plugins_loaded action. This because prevents other language-related plugins from properly hooking into the load_textdomain() function, so load_plugin_textdomain() should be triggered during init action. reference
the change is needed here:
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
must be changed in this way:
$this->loader->add_action( 'init', $plugin_i18n, 'load_plugin_textdomain' );
Hi, I realised the translations were not working, and after some investigation I discovered that plugin's translations should not be loaded during the
plugins_loaded
action. This because prevents other language-related plugins from properly hooking into the load_textdomain() function, so load_plugin_textdomain() should be triggered duringinit
action. referencethe change is needed here:
$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
must be changed in this way:
$this->loader->add_action( 'init', $plugin_i18n, 'load_plugin_textdomain' );
hope it helps
ps. thanks for this useful boiler template!