• Resolved nahnufitness

    (@nahnufitness)


    Hello,

    I am using WPML and have the Checkbox opt-in message translated in the string setting on WPML, but only English will load.

    Is there a code snipped or another setting I am missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter nahnufitness

    (@nahnufitness)

    Try now I am using this snippet to load some JS to make the Arabic show:

    function custom_text_replacement_script() {
    if (is_page(557)) { // Check if the current page is the one with ID 557
    echo '<script>
    document.addEventListener("DOMContentLoaded", function() {
    document.body.innerHTML = document.body.innerHTML.replace(/Yes, I want to receive your newsletter\./g, "???? ???? ?????? ?????? ????????? ?????? ??.");
    });
    </script>';
    }
    }
    add_action("wp_footer", "custom_text_replacement_script");
    Plugin Support Ojoma a11n

    (@geraltrivia)

    Hello there @nahnufitness ,

    Thank you for reaching out to us.

    Mailpoet doens’t officially support WPML: https://kb.mailpoet.com/article/203-support-for-multilingual-plugins

    Do you wish to translate just the opt-in checkbox to Arabic? If yes you can use a plugin called Loco Translate to acheive this.

    Cheers!

    Thread Starter nahnufitness

    (@nahnufitness)

    Hello,

    I feel you did not understand what I wrote.

    I have already used WPML to translate the string for the line “Yes, I want to receive your newsletter.” The problem is that the transaction does not show when the site is in Arabic. I don’t need to use Loco Translate to achieve the same thing. Also, it is bad advice to even offer someone to use two translation plugins at once.

    I am not asking for full WPML support but to be able to make sure this one part of the plugin works properly.

    There seems to be an error with how the string is loading in the opt-in checkbox text. The translated text string does not load. Only the original text from within the opt-in checkbox settings will show.

    • This reply was modified 1 month, 3 weeks ago by nahnufitness.
    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    Can you share a screenshot of where this string is located?

    You could use https://snipboard.io/ to take the screenshot and send me the link to it.

    Thread Starter nahnufitness

    (@nahnufitness)

    Hello,

    This isn’t my first WPML website. Here is a link: https://snipboard.io/i68AQ5.jpg

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @nahnufitness,

    I think the issue here is that the opt-in checkbox label is just going to display whatever is saved under MailPoet > Settings > Basics in the “Subscribe in registration form” setting:

    Changing the site language wouldn’t overwrite what is saved in that field (similar to how it wouldn’t change other settings like the FROM address, unsubscribe page, etc). So if the settings have “Yes, add me to your mailing list” saved in that field (in the wp_mailpoet_settings database table), then that’s what will be displayed on the frontend, regardless of the site language. If you wanted the opt-in checkbox to display Arabic, then you would need to save the Arabic text/string there instead.

    Due to that fact, it also wouldn’t be compatible with WPML (and as my colleague mentioned, we don’t directly support any multi-lingual plugins).

    Thread Starter nahnufitness

    (@nahnufitness)

    Hello,

    Very strange. I will just keep using my JS workaround for now, then.

    Normally plugins without WPML support still will work with the string translation.

    Thanks for looking into this for me!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.