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 :
<mail>
<Theme>mytheme_en</Theme>
<Template>weekly</Template>
<subject><![CDATA[<?php printf( __('[%1$s] Weekly newsletter in english', MP_TXTDOM), get_bloginfo('name')); ?>]]></subject>
</mail>
or template within the mailpress current theme :
<mail>
<Template>weekly_en</Template>
<subject><![CDATA[<?php printf( __('[%1$s] Weekly newsletter in english', MP_TXTDOM), get_bloginfo('name')); ?>]]></subject>
</mail>
+ their own threshold
<processor>
...
<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 https://goo.gl/0j6o2 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 :
<?php
$_GET['lang'] = 'en'; // force the value of $_GET['lang']
$count_post = 0;
while (have_posts()) :
the_post();
// <!-- maybe some html comments to clean up in
// get_the_content() before test -->
if (empty(get_the_content())) continue;
$count_post++;
?>
.....
<?php
endwhile;
if (!$count_post) {
ob_end_clean();
return '';
}
?>
==== there might have some issues using {{the_title}}