Support » Plugin: qTranslate » qTranslate and MailPress (e-mail subscription)

  • Dear developers,

    I’m using MailPress at the moment to manage my subscriptions.

    I would like to add bilingvo functionality to my site.
    qTranslate seems to be a nice candidate for multiple languages support,
    But the question is how to send different e-mails based on subscribers
    language preference?

    Questions on MailPress side:
    I can imagine adding two more post categories (English and Russian)
    and adding a possibility to choose one of them
    during subscription, that would solve the problem on subscription side.
    Could MailPress developers give me a hint please
    on how to implement my own subscription form (name/email/language),
    which I would be happy to share if there is interest.

    Questions on qTranslate side:
    I don’t know how multilingvo feature is implemented,
    but is it possible to use different categories for different
    language versions of a post? If not, how can I choose appropriate
    content to be added to subscribers e-mail?

    Ps. If anyone has any experience with that problem,
    I will be happy to know it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • MorlanXaos


    I have the same situation. I am using 3 different languages in my web page, but I can only Mail in one.

    I think that the better way is to sort users in different mailing list when they click subscribe. For example if English man click subscribe than place him in English mailing list. And so on this each other.
    Then create one mail for each language and send them to appropriate mailing list.

    I agree, that seems to be a more practical way.
    Right now I duplicate categories in 2 languages and let users to subscribe to whatever. When posting – category for appropriate language is used.

    The only thing I don’t know how to do is to
    change default subscription based on, say, browser language.

    Alesey, have you tried it?

    The only thing I don’t know how to do is to
    change default subscription based on, say, browser language.

    What do you mean under “default subscription”?

    In mailpress settings->subscription there is an option to chose default categories to subscribe users. Probably via customization of subscribe widget these can be changed on-the-fly, but I have no idea how 🙂

    You can add user to a different mailing list by showing different subscription forms.
    Just add this shortcode [mailpress mailinglist=id] to the page template (use do_shortcode() ).
    Change ‘id’ on the fly, based on page language.

    Alexey, i think you are talking about maillists (manually send e-mails to certain lists), whereas I use newsletters (automatically e-mail if new posts in categories the user is subscribed to apper).

    qTranslate + MailPress support has been addressed many many times.
    Here are some hints, requires good coding skills, and tests, tests, tests … and sometimes ability to analyse qTranlsate and MailPress code .
    Good luck ! …

    Language selection in qTranslate :
    * language selection is based on ( ?lang=xxx , $_GET[‘lang’] ) so language is in the url and so is browser oriented …

    Integration into MailPress : not that simple !

    * Mails having templates such as ‘confirmed’, ‘moderate’, ‘new_user’, ‘retrieve_pwd’ … requires to test the $_GET[‘lang’] value to set the appropriate translations in the current mailpress theme templates.

    * Mail template ‘comments’ cannot be sent in the subscriber language …

    * Mails > add new : cannot be sent in the subscriber language …

    * for newsletters :
    ++ for each language supported
    — for each periodicity (new_post, daily, weekly, monthly)
    ==== create a newsletter (mp-content/advanced/newsletters/) to allow subscribers to subscribe to the newsletters in their language. Each newsletter will address its corresponding mailpress theme and or template :

    		<subject><![CDATA[<?php printf( __('[%1$s] Weekly newsletter in english', MP_TXTDOM), get_bloginfo('name')); ?>]]></subject>

    or template within the mailpress current theme :

    		<subject><![CDATA[<?php printf( __('[%1$s] Weekly newsletter in english', MP_TXTDOM), get_bloginfo('name')); ?>]]></subject>

    + their own threshold

    		<threshold>MailPress_weekly_en</threshold><!-- stored on wordpress options table -->

    — create a mailpress theme and/or corresponding newsletter templates (mp-content/themes/)
    ==== force the value of $_GET[‘lang’] : several ways to do so among which :
    $$$$$ in the _loop.php file of the dedicated theme
    $$$$$ in the template file
    $$$$$ or use the parent/child theme api to do so …
    ==== have a specific test in the loop if title/post do not exist in the specified language and a counter tallying if there is at least a post in the newsletter. something like that :

    $_GET['lang'] = 'en'; // force the value of $_GET['lang']
    $count_post = 0;
    while (have_posts()) :
    // <!-- maybe some html comments to clean up in
    //      get_the_content() before test -->
       if (empty(get_the_content())) continue;
    if (!$count_post) {
       return '';

    ==== there might have some issues using {{the_title}}

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘qTranslate and MailPress (e-mail subscription)’ is closed to new replies.