• 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?

    https://www.ads-software.com/plugins/profile-builder/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Thank you for reaching out to us.

    I will test this to see if I can replicate the issue. I will reply as soon as I know more about this.

    Best regards,

    Hi,

    I tested PB with WPML Multilingual CMS plugin and WPML String Translation add-on. I went to WPML -> Theme and plugins localization -> Checked Translate the theme and plugins using WPML’s String Translation.

    Then I scrolled down until I saw Strings in the plugins -> Checked Profile Builder and clicked on Scan the selected plugins for strings.

    In WPML -> String Translation I can add my own translation for the scanned strings. I went to Pages -> All Pages -> Recover Password Page and clicked on the “+” sign (Add translation to French) to create the Recover Password page in French language.

    I published the page and then I accessed it to view if the strings were translated, and they were.

    Please test this out also and let me know how if it works for you.

    Best regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘load_plugin_textdomain returns false’ is closed to new replies.