• Resolved Webfolio Webdesign

    (@webreneszansz)


    Hi,

    Please be so kind and let me know, how can I translate the content of the: !!membership_change!!

    I translated the The new level is: %. via wpml sting translation option, but in vain, the emails for the change of the membership level still send the English expression.

    I also edited the po/mo files with Poedit and added to the proper foder, but in vain, cache is deleted.

    I tried to use the !!membership_level_name!! instead, but this email does’t load the membership level in case of this reference, it send this as simple text.

    Thank you very much!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi @webreneszansz

    Thank you for reaching out to Paid Memberships Pro.

    Have you saved your email templates? If you save your email template it may not be translatable by WPML or other plugins as the data gets stored directly into the database.

    You can reset your email templates to it’s default which should make it translatable again as it’s loading from the plugins code and not the database.

    There are ways around this to load custom templates via PHP (and/or HTML templates) for multiple languages using the ‘pmpro_email_body’ filter – https://www.paidmembershipspro.com/hook/pmpro_email_body/

    This will allow you to swop out the email’s contents based on locale and custom logic.

    I tried to use the?!!membership_level_name!!?instead, but this email does’t load the membership level in case of this reference, it send this as simple text.

    What email template are you referring to? I may have a way to add this back but it really depends on which email template is used. Not all variables are available for all email templates.

    Thread Starter Webfolio Webdesign

    (@webreneszansz)

    Hi,

    Thank you very much for the prompt and detailde answer, I really appreciate it.

    Yes, I modified and saved the template, because I translated it and I have to insert additional text, above the standards, so to use only the standard text with translation seems to be not enough for this issue.

    I use the change memmership (for members) email template.

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for the feedback, this will require further customization using PHP code and the filter provided. You can filter the body contents as you would in the Edit Template but translate it to your locale.

    If you need to swap the contents of the email based on the user’s locale (multilingual site) you will need to use custom code to achieve this.

    Regarding the !!membership_level_name!! email variable, this should be available in the “Admin Change” email template the member receives and should work – I haven’t been able to replicate this issue.

    There is a filter to allow you to add your own (and existing) email variables by using the pmpro_email_data filter – https://www.paidmembershipspro.com/hook/pmpro_email_data/

    I hope this helps clear things up.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation and email field setup’ is closed to new replies.