Home › Forums › Newsletter Plugin Support › compatibility wit WPML
- This topic has 5 replies, 4 voices, and was last updated 5 years, 7 months ago by
jnz.
-
AuthorPosts
-
March 2, 2017 at 2:07 pm #30416
pdagrafica
ParticipantGood morning, I find very interesting your plugin, but there is not a presales support. In fact, I have a question. I am creating a site in WP + + WPML Woocommerce. WPML, he says that your plugin is not compatible. There is a chance to make it compatible?
March 16, 2017 at 1:21 pm #31000Stefano
KeymasterIt’s in our planes, but we’re concentrated to release a couple of extension right now and a fully revision of the lists management. After that we are going to surely consider the wpml compatibility.
Stefano.
September 4, 2017 at 9:54 pm #43502matom
ParticipantAny news about the WPML compatibility?
September 21, 2017 at 5:31 pm #45645jnz
Participant+1 on wpml support.
i currently try to translate all the emails sent out by tnp, but for now i don’t see any chance to do so.September 21, 2017 at 6:52 pm #45649jnz
ParticipantOK. i found a solution for this issue. since the newsletter strings are saved in the options table, you can add a file to the plugin folder, that tells wpml to search for some specific strings.
so the file has to be called
wpml-config.xml
and needs to be placed inside the newsletter plugin folder.
here are the contents of the file
<wpml-config>
<admin-texts>
<key name="newsletter">
<key name="profile_text"/>
<key name="profile_email_changed"/>
<key name="profile_error"/>
<key name="confirmation_text"/>
<key name="confirmation_subject"/>
<key name="confirmation_message"/>
<key name="confirmed_text"/>
<key name="confirmed_subject"/>
<key name="confirmed_message"/>
<key name="unsubscription_text"/>
<key name="unsubscription_error_text"/>
<key name="unsubscribed_text"/>
<key name="unsubscribed_subject"/>
<key name="unsubscribed_message"/>
</key>
</admin-texts>
</wpml-config>
these strings then appear in wpml under string translation. search for the domain admin_texts_newsletter
i did this and was able to receive the confirmation email in my current language. now the link is still pointing to the english confirmation site, triggering the english confirmation email (i have double opt-in active), but maybe this is solveable as well.
i switched the url manually, and that sill caused the english text to be loaded.
so i changed the file /newsletter/subscription/subscription.php line 1903
NewsletterSubscription::instance();
to
//NewsletterSubscription::instance();
and added
add_action('plugins_loaded', function (){
NewsletterSubscription::instance();
}, 99);
at the end of the file.
problem here is, that tnp is triggered too early, not waiting for other plugins to run, and this hook helps out on this end..so. getting there. dear stefano, please consider to change this last code snippet in your original files and please continue on making this plugin even better / wpml friendly..
October 5, 2017 at 9:54 am #47219 -
AuthorPosts
- You must be logged in to reply to this topic.