• Resolved Nikelaos

    (@nikelaos)


    Hello!

    Some of the translations into German do not meet my requirements or are completely missing. And a mix of German and English certainly doesn’t look that good.

    I found a plugin that allows me to load a custom text domain. But apparently the MailPoet plugin doesn’t load the translations the WordPress default way, at least the hook load_textdomain for MailPoet doesn’t seem to be triggered.

    How can I load my own translations without overwriting the default translations in wp-content/languages/plugins, which will probably be changed again with the next MailPoet update?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Dani F. a11n

    (@danielinhou)

    Hi there @nikelaos ????!

    Thank you for reaching out to MailPoet Support!

    oad my own translations without overwriting the default translations in wp-content/languages/plugins, which will probably be changed again with the next MailPoet update?

    Have you reviewed the approach shared in this tutorial? https://kb.mailpoet.com/article/169-how-to-translate-the-plugin-to-your-language

    That will be a good way to make changes but I also think (as you do) that they will get lost with new updates. I am checking this with the devs and will get back to you as soon as possible.

    Cheers!

    Thread Starter Nikelaos

    (@nikelaos)

    Hello @danielinhou , thank you for answering!

    Yes, I knew this way of getting a translation. But please see, that my translations are fitting very special needs, so that they are not usable in general. And because I have only a few special translations, I don’t want to miss an actualized translation file with new or updated translations.

    To manage my few special translations for plugins or themes I use the plugin “WPT Custom Mo File” by WP-Translations Team, which a have modified a bit, so that my few translations are overriding those of the used main translation file. That works fine – but mailpoet is not listed in that plugin, although many other plugins are. That’s the background of my question: the WPT-plugin uses load_textdomain to build up the list of manageable plugins, and mailpoet doesn’t appear there. So my idea was, that mailpoet doesn’t trigger load_textdomain.

    Plugin Support Dani F. a11n

    (@danielinhou)

    Hi again @nikelaos ????

    Thanks for the additional context. I have just shared this with our developers because they are currently changing the way translations are implemented in MailPoet.

    We’ll get back to you as soon as we have any updates.

    Cheers

    Plugin Support Dani F. a11n

    (@danielinhou)

    Hi again!

    OK, so we’be been testing this and here you have what we found plus a workaround.

    MailPoet does call ‘load_textdomain’. Our developers did some debugging with the plugin WPT Custom Mo File plugin and found that MailPoet calls the function before the WPT Custom Mo File hooks into ‘load_textdomain’ action.

    This is why the plugin misses that the MailPoet plugin called it. It is also needed to be done this way because Mailpoet needs to load translations for some error messages.

    So, this means that Mailpoet doesn’t work with WPT Custom Mo File out of the box. You might be able to “fix this” by using a plugin that allows to modify the order in which WordPress loads plugins (e.g Plugins Load Order). If you set up WPT Custom Mo File to be loaded first, you will be able to assign mo file for Mailpoet domain.

    Having said all this, there’s also another alternative fix. If you save your custom translation to the path wp-content/languages/plugins/ instead of the one we mentioned before that will prevent it from being deleted with every new update.

    I am in the process of updating our Knowledge base now but you can find further information on this WooCommerce.com tutorial: https://woocommerce.com/document/translate-woocommerce-extensions/

    I hope this helps!

    Thread Starter Nikelaos

    (@nikelaos)

    Thank you, @danielinhou , for this great support!

    I use the plugin “Plugins Load Order” by Jose Antonio de la Barrera Mayoral already and put there the WPT plugin as LAST, because I suspected an order problem. If it is loaded FIRST (or at least before mailpoet, as my tests show me), it works in my installation also…. sounds a bit funny for an undergraded WP-User… ??

    So, let me be a bit personal: Problem solved — Happy New Year! ??

    (And, last but not least: Thanks and greetings to the dev-team!)

    • This reply was modified 3 years, 2 months ago by Nikelaos.
    Plugin Support Dani F. a11n

    (@danielinhou)

    Hi again @nikelaos ????!

    Hey, thank you so much for the kind feedback, I’m glad it worked out, it was a complex issue for me too.

    Enjoy this new year.

    Cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Mailpoet doesn’t trigger load_textdomain?’ is closed to new replies.