I am trying to translate my custom plugin.
I can translate my plugin if I place the fr_CA.po/.mo
into my
wp-content\languages\plugins
manually.
But I would like to be able to put my .po/.mo into my plugins folder in "myplugin/languages"
Well, in the main file, I have this:
* Text Domain: myplugin
* Domain Path: /languages/
my text
add_action( 'init', 'myplugin_load_textdomain' );
function myplugin_load_textdomain() {
load_plugin_textdomain( 'myplugin', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
}
all my .po / .mo
is in that folder myplugin/languages/
My WordPress is in fr_CA
( WordPress 4.7.2–fr_CA)
I have a fr_FR.po /fr_CA.po
(and their .mo
).
Like I said previously, my plugin change the language if I put my .po/.mo
into the wp-content\languages\plugins
and I change the fr_FR(.mo/.po)
to myplugin-fr_FR(.mo/.po)
but I would like to keep my .po/.mo
into my plugins folder.
Anyone know what is the problem?