Load_plugin_textdomain not working

Hey, I'm trying to localize a plugin called Donate Plus (which is technically localized).

the plugin got en_CA and de_DE files, I tried to create the he_IL file without success. So I tried with the de files with the plugin but did not work.

I installed WPLANG in wp-config.php in de_DE but did not change the code.

This is the installation code:

load_plugin_textdomain( 'dplus', '/wp-content/plugins/donate-plus' );

And I made sure that the whole line is set for localization.

Who has a key?

+3
source share
5 answers

I just had the same name, did you try to rename your files from de_DE.po and de_DE.mo to name-of-plugin-de_DE.mo and plug-in-name-de_DE.po (changing the name-plug-in with yours, of course)?

dplus-de_DE.mo and dplus-de_DE.po It should work;)

+3

DonatePlus, , .

load_plugin_textdomain() DonatePlus. "init". ( ) init.

if( class_exists('DonatePlus') )
    $donateplus = new DonatePlus();
+1

load_plugin_textdomain . - (, .po .mo , "" )

load_plugin_textdomain( 'dplus', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
+1

.po .mo? /wp -content/plugins/donate-plus? , .

0

: load_textdomain (TEXT_DOMAIN, WP_PLUGIN_DIR. '/'. dirname (plugin_basename (FILE)). '/languages ​​/'. get_locale(). '. mo');

0
source

All Articles