load_plugin_textdomain returns false
-
Profile Builder version 2.4.2
Using WPML 3.4.1 to switch languages.
I am using the following shortcode:
[wppb-recover-password]
embedded on an English and a French page, but only the English text is displayed in both languages.On further investigation, I checked the return code for:
load_plugin_textdomain in index.php : wppb_init_translation
and it is returning false. This indicates the language files are not loading.I verified the code is using the else condition and the third parameter is “profile-builder/translation/” as expected.
I also tried to change
add_action(‘init’, ‘wppb_init_translation’, 8);
to
add_action(‘plugins_loaded’, ‘wppb_init_translation’, 8);
as recommended by one of the two WordPress links for load_plugin_textdomain. The first two search Codex entries contradict themselves. Both result in load_plugin_textdomain returning false.The file profile-builder-fr_FR.mo is in the translation directory as expected. I could NOT open the mo file with poedit, but the po file contained the French translations the shortcode is looking for.
Do you have any suggestions?
- The topic ‘load_plugin_textdomain returns false’ is closed to new replies.