latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Email Translations in .po an .mo Files

Home Forums Community Forum Email Translations in .po an .mo Files

This topic contains 3 replies, has 2 voices. Last updated by  Jason (Lead Developer) 3 years, 11 months ago.

Topic Author Topic
Posted: Thursday Jan 10th, 2013 at 1:29 pm #36873
Andaluzo
Username: andaluzo

Hi,

I translated the following parts into german and spanisch:

Congratulations! ( your membership has been approved )

and

Thanks %%%%first_name%%%%! Your membership has been approved.\n
\n
%%%%item_name%%%%\n
\n
Subscr. ID: %%%%subscr_id%%%%\n
Charges today: $%%%%initial%%%%\n
Recurring charges: $%%%%recurring/regular_cycle%%%%\n
\n
Your Username/Password will arrive shortly, in a separate email. If you have any trouble, please feel free to contact us.\n
\n
Best Regards,\n
%s

The site is complete in German (WPLANG=’de_DE’) resp. Spanish (WPLANG=’es_ES’) and other translations as f.ex. the PayPal Pro Forms are displayed correctly in German. But the Customer gets the Emails which results out of the above text in english.

Is there any work around for that Situation. URGENT!

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Saturday Jan 12th, 2013 at 5:28 am #37104
Staff Member

Thanks for your inquiry.

~ We appreciate your patience :-)

In order to translate these customizable/dynamic portions of s2Member, you will need to use WordPress filters exposed by the s2Member plugin. Here is an example showing how to accomplish this.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

Please let us know if problems persist :-)

Posted: Friday Jan 18th, 2013 at 12:39 pm #38043
Andaluzo
Username: andaluzo

I did tried for several days, and it does not work, I still get english emails.

The file resides in

/wordpress/mu-plugins/s2-hacks.php

Content of the file

<?php
// Customize and translate the subject line.
add_filter('ws_plugin__s2member_signup_email_sbj', 'my_signup_sbj', 10, 2);
function my_signup_sbj($sbj = '', $vars = array())
{
        $paypal = $vars['paypal'];

        if(WPLANG === 'de_DE')
                {
                        return 'Ihr Mitgliedschaft wurde bestätigt';
                }
}

// Customize and translate the message body.
add_filter('ws_plugin__s2member_signup_email_msg', 'my_signup_msg', 10, 2);
function my_signup_msg($msg = '', $vars = array())
{
        $paypal = $vars['paypal'];

        if(WPLANG === 'de_DE')
                {
                        return '
                        Danke $paypal['first_name']! Ihre Mitgliedschaft für  wurde bestätigt.\n
                        \n
                        $paypal['item_name']\n
                        \n
                        Ihre Mitgliedschafts. Nr.: $paypal['subscr_id']
                        Heute bezahlt: € paypal['initial']\n
                        \n
                        Ihr Benutzername und Passwird wird Ihnen mit einer separaten Email zugesendet. Sollten noch irgendwelche Fragen offen sein, kontakten Sie uns bitte über$
                        \n
                        Viele Grüße,\n
                        Ihr Service Team von \n
                        %s';
                }
}
Posted: Sunday Jan 20th, 2013 at 2:29 pm #38452
Staff Member

Thanks for the follow-up :-)

Looks good from my end. Have you verified what WPLANG is equal to?

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.