• after editing the Checkbox opt-in message its not showing up in translations or translating

    i try to edit it in loco but there the edited Checkbox opt-in message is not showing up

    The page I need help with: [log in to see the link]

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter dennisr1

    (@dennisr1)

    and from what i can hear you only switch your language on your wordpress that dont have anything to do with this..??

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @dennisr1,

    Yes, that is currently expected behavior. Rather than translating via a translation plugin or translation file, you would need to set the text for the Checkout opt-in checkbox via the “Checkbox opt-in message” setting under MailPoet > Settings > WooCommerce.

    Aside from that, setting it via the PHP filter mentioned above is also another option if you need to load a different translation for different languages/conditions.

    (Note that MailPoet does not directly support multi-lingual plugins currently)

    Thread Starter dennisr1

    (@dennisr1)

    yaa but where do i set the PHP filter so i can try it out..??

    he just some code i dont know what file to edit or what files

    // Custom MailPoet opt-in label on Woo Checkout page function myplugin_update_checkout_optin_template($template, $inputName, $checked, $labelString) {    $checked = checked($checked, true, false);    $newLabelString = __('Hello world', 'myplugin');    return '<label class="woocommerce-form__label woocommerce-form__label-for-checkbox checkbox">      <input id="mailpoet_woocommerce_checkout_optin" class="woocommerce-form__input woocommerce-form__input-checkbox input-checkbox" ' . $checked . ' type="checkbox" name="' . esc_attr($inputName) . '" value="1" />      <span>' . esc_html($newLabelString) . '</span>    </label>';}add_filter('mailpoet_woocommerce_checkout_optin_template', 'myplugin_update_checkout_optin_template', 10, 4);
    • This reply was modified 2 weeks, 6 days ago by dennisr1.
    • This reply was modified 2 weeks, 6 days ago by dennisr1.
    Thread Starter dennisr1

    (@dennisr1)

    Hallllooooooooo

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there @dennisr1,

    There are various guides online for adding PHP snippets to sites, such as this one from WP Beginner: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-pasting-snippets-from-the-web-into-wordpress/

    However, please note that adding code to your site can be dangerous if you are not sure what you are doing, and you would also need to adjust the code snippet for your needs (the one shared previously was just an example). If you are not sure about working with code or adding PHP snippets to your site, then we would strongly recommend reaching out to a developer: https://woocommerce.com/development-services/

    Thread Starter dennisr1

    (@dennisr1)

    that dont chance anything when i set the new newLabelString its still a static string i cant translate..??

    Thread Starter dennisr1

    (@dennisr1)

    i just wanna translate the customer viewing string i spend over a month now trying to get and answer from your team and we still a Zero

    Plugin Support kellymetal a11n

    (@kellymetal)

    To be clear: neither the setting nor the PHP filter will “make the string translatable” via multilingual plugins or translation files. By default most people set the string in the MP > Settings > WooCommerce page. Alternatively, you can also set it via custom code using the PHP filter. However neither of those will make it compatible with other translation options — there’s not a built-in/simple way to make them compatible.

    Thread Starter dennisr1

    (@dennisr1)

    i dont understand the logic her you send me a solution that dont do same thing NOTHING
    what support team

    fucking waist of time this crap

    Plugin Support Lynn J.a11n

    (@lynnjat7)

    Hi there @dennisr1,

    I do apologize that the plugin has not been working as expected but please do keep in mind we do our best to provide support here for a free plugin in an open forum.

    I understand you are setting up a complex site that will be supporting multiple languages. It is true that MailPoet is not always the best choice for sites of this nature. We are not yet fully compatible with the typical language plugins including WPML, Polylang, and Loco Translate. There are many features of that plugin that do not work as expected with MailPoet at this time.

    We continue to work towards full multi-language support as an internal project but as this is a complex scenario that affects a very small percentage of our customers, it is not a priority goal at this time.

    So, to confirm:

    • you can use the string setting box under MailPoet > Settings > WooCommerce to set the sign up string to **a specific, single other language**
    • you can use the snippet we provided again, to change the sign up string to **a specific, single other language**
    • you can take the snippet we provided and adapt it to work with multiple languages -> this would most likely take a developer who is familiar with the language checks introduced by your multi-language plugin

    None of these solutions, however, will enable the ability for Loco Translate / WPML / Polylang to pick up this string and translate it for different contexts, as that integration simply does not yet exist in MailPoet.

    Hope this is clear!

Viewing 10 replies - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.