This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 13 replies, has 2 voices.

Last updated by Jamal 6 months ago.

Assigned support staff: Jamal.

Author Posts
March 11, 2019 at 1:28 am #3306747

Catherine

I am trying to: have a FR and EN version for the confirmation emails (Your voucher is ready!), so I updated both po-mo files with good content / translations.

Instead, I got:
The original FR emails were showing EN text. Once I've translated the FR version with Poedit, the FR emails did show good, but then the EN emails started to show FR text. I then dit a en_US po-mo file, thinking it would solve the issue, but nope...

How can I have EN text in the confirmation email when the voucher is ordered in the EN version of the website, and FR text in the email when the order is made through the FR site version?

Thanks 🙂

March 11, 2019 at 2:01 pm #3313407

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

I suspect that WPML is configured to translate string from the database and not the po-mo files.
Can you check the settings in WPML->Theme and plugins localization. See attached image for my local setting.

To learn more about it see this article https://wpml.org/documentation/getting-started-guide/theme-localization/

Let me know if this is the cause.

Best regards,
Jamal
WPML Support

March 11, 2019 at 3:35 pm #3314447

Catherine

Hi Jamal 🙂

WPML is configured to use po-mo files (see attached) and it works because most of the string do show right and the email languages changed the moment I uploaded the fr_FR mo file.

The thing is that the moment I've uploaded the FR mo file, the English emails started to show French text...

So I've uploaded the en_US mo file, but this one seems not to be read, and FR text still show up in EN emails.

March 11, 2019 at 4:20 pm #3314705

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi :-),

So what i can think of now is either this not related to WPML or that this is a probably a bug.

To exclude the first, in your test server, deactivate WPML plugins, set language site to english and reproduce the email to check. If the issue is present, then it is probably related to the translation file.

In the other case, i would like to reproduce this in a clean install, i will create a test server and give you credentials to upload the plugin and reproduce the issue. If reproduced, i will escalate the request to our compatibility team for further analysis.

Would you like to do the test ?
Should i create the test server so we can isolate this issue from your current setup ?

Looking forward to you reply.

Best regards,
Jamal
WPML Support

March 11, 2019 at 5:25 pm #3315193

Catherine

Yes, please create the test server 🙂

As for the first option, it's quite hard to test on my side, as my customer site is live and his season just kicked off... So I would need to rebuild the site on a dev server myself 🙁

Catherine 🙂

March 12, 2019 at 9:40 am #3320263

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Catherine,

Sure we can do that. Let's start with the first one. I have create a new server and you will find credentials in the private message. There are already some needed plugins installed (WPML and WooCommerce).

WP Mail Logging is also installed to view the generated email, as our server does not implement any mailing system.

First let's test when WPML is deactivated. Test when website language is English then is French, you can change site language in Settings->General. If the issue is still present, then we should investigate either the po-mo files or a bug within the plugin.

If it gives the desired results for both languages, then activate and configure WPML, this would involve activating also String Translation, Translation Management and WooCommerce Multilingual. and test again.

Looking forward to your reply.

Best regards,
Jamal
WPML Support

March 12, 2019 at 5:12 pm #3326847

Catherine

I've uploaded the plugin and created voucher template.

I need to "buy" a product to receive the email, so I created one, added variation and put the price at 0$.

When I "buy it", vouchers are created and visible through admin, but I don't receive any email, either in FR or EN. I guest it's because the price is 0$?

If I try with 0,01$, I therefore have to use my credit card, but I don't know to whom the "payment" would go? (if even enabled).

Catherine 🙂

March 13, 2019 at 1:49 pm #3334193

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Catherine 🙂

The emails are not sent, they are logged by "WP Mail Log". I can see emails that were send, there are 4 vouchers(pdf files) created and attached to email so far, but they are all in English.
You can see the mails in "WP Mail Log".

Language website is set to "English(Canada)". Can you test now if you set it to French what would be the outcome of the vouchers ?
Then test if you activate WPML and configure it similar to your website, what would be the outcome ?

Looking forward to you reply.

Best regards,
Jamal
WPML Support

March 15, 2019 at 6:20 pm #3356283

Catherine

Hi Jamal,

I did several tests with WP in French and unfortunately, emails keeps showing in EN. Bug with the plugin?

Catherine

March 16, 2019 at 9:05 am #3359415

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Catherine,

I checked the sandbox and it seems that French is the language website. In this case the mail should be sent in French. The plugin email templates seems to be localized(use of _n, _e) and should be sent in French.
Either this is a bug with the plugin or that the french mo file is corrupted and the WordPress fallback to original strings.

What if you activate WPML and use String Translation instead of mo files. If WPML handles it correctly you can then export all WPML translation for the plugin into a new mo file.

In the other hand you can also ask the plugin author about this experience.

Regards,
Jamal

April 12, 2019 at 10:53 pm #3602357

Catherine

Hi Jamal,
Sorry for late reply.
I see the sandbox has expired, so I can't do more tests. 🙁

Here is a short translation of the answer of the PDF Voucher support:
"Email are a bit complicated. All our extensions has .pot files which allow you to translate in any language, and all email's string are included there. But our extension are built in the mindset of a single language use (yourwebsite.com/fr, yourwebsite.com/en). I've checked on WPML's list of compatible extensions and I did not see PDV Voucher: https://wpml.org/documentation/plugins-compatibility/

Does it means WPML has to adapt or it's on PDF Voucher's hands?

Thanks 🙂

April 15, 2019 at 8:51 am #3611229

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

I created a new test server, credentials are in the private message. Note that the server will expire after 7 days from the last login.

Even if the plugin is not listed as compatible, WPML would probably work with the plugin. We can also assume it is a bug in WPML.

To be sure, please do the following:
- Install WP Mail Logging, se we can monitor emails.
- Upload/Install PDF vouchers plugin.
- Configure website in French before activating WPML.
- Perform a test, if the email is sent in French, it means the plugin is working correctly.

Then configure WPML with a secondary language and try again.
If this time the email was not sent in the appropriate language, it means that's a compatibility bug within WPML or the plugin. At this stage, i can approach our compatibility team for further assistance and probably for a fix. They will try to contact the author if needed.

Best regards,
Jamal

April 16, 2019 at 5:22 pm #3624249

Catherine

Hi Jamal,

I've set up the plugin + WP in French and made a test. Email is sent in English... 🙁

I'll write back to PDF Voucher support and will let you know their answer.

Catherine 🙂

April 17, 2019 at 7:40 am #3627913

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Bonjour Catherine,

Thanks for your feedback. Thank you for your collaboration.

I'll set the ticket as needing feedback from customer for the moment. Once you reply we'll continue our investigation.

Best regards,
Jamal

The topic ‘[Closed] Woocommerce PDF Vouchers' Emails won't translate accordingly’ is closed to new replies.