Navigation überspringen

Dies ist das technische Support-Forum für WPML – das mehrsprachige WordPress-Plugin.

Mitlesen können alle, doch nur WPML-Kunden können hier Fragen veröffentlichen. Das WPML-Team antwortet im Forum an 6 Tagen pro Woche, 22 Stunden am Tag.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Unterstützt die Zeitzone: Europe/Zagreb (GMT+01:00)

Schlagwörter: 

Dieses Thema enthält 16 Antworten, hat 0 Stimmen.

Zuletzt aktualisiert von remigiusK Vor 53 Minuten.

Assistiert von: Bruno Kos.

Verfasser Beiträge
Februar 4, 2025 unter 9:27 am #16665546

remigiusK

Hintergrund des Themas:
I am trying to ensure that the invoice email is sent in the correct customer language using the template (Tour order system). Goodlayers support added a debug message in the tourmaster.php file and mentioned that the language is changed correctly using "wpml_switch_language_for_email" based on the recipient. However, they noted that gettext is not responding with the correct language. Link to a page where the issue can be seen: versteckter Link

Die Symptome:
The invoice email is sent in German instead of English, and gettext is not responding with the correct language.

Fragen:
Why is the invoice email not sent in the correct language?
How can I resolve the issue with gettext not responding with the correct language?
Goodlayer mentioned I should contact you

Februar 4, 2025 unter 1:15 pm #16666807

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

Hi,

Would it not be this case (or very similar)?
https://wpml.org/forums/topic/unable-to-send-email-in-second-language/#post-13565757

As in that ticket we found whole class for these translations missing and we can't implement this for them.

Can you ask them to join our https://wpml.org/documentation/support/go-global-program/ and tell us their response?

Februar 6, 2025 unter 7:23 pm #16676981

remigiusK

Hello Bruno,
Thank you for your response. Indeed I have the same issue than you mentioned and I am surprised that this user said the author of the theme found the issue and will fix it.
I will contact the theme author again and ask them to join the go-global-program.
Kind regards, Remy

Februar 7, 2025 unter 10:48 am #16679046

remigiusK

Hello Bruno, I just noticed that the issue I have is very similar but it is when sending the invoice via Email. The content doesn't get translated on other languages.

What does the Goodlayers author means when he says: BTW, the gettext is not responding with the correct language. Could you check with the WPML author about this.

Thanks and regards, Remy

Februar 8, 2025 unter 6:28 pm #16683021

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

It seems they are suggesting that the WPML hook https://wpml.org/wpml-hook/wpml_switch_language_for_email/, which can be implemented as described in https://wpml.org/documentation/support/sending-emails-with-wpml/, is not functioning as expected.

However, the issue might also stem from the way they implemented the class, so it could go either way.

Would you be able to test it using the following sandbox link?
versteckter Link

Try installing their plugin/theme here and attempt to reproduce the issue with a simple order. Make sure at least one translated string in the emails does not translate correctly in your site.

Additionally, I have installed the Email Log plugin, which will record all outgoing emails for easier debugging.

If we see the issue here I will escalate the case to our compatibility team.

Februar 11, 2025 unter 7:56 am #16690190

remigiusK

Hi Bruno, thank you for your response. Please bear with me a few days since I am travelling the next two days. Kind regards, Remy

Februar 11, 2025 unter 10:21 am #16690804

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

No problem, safe travels!

The ticket will be closed automatically after about 10–14 days if there are no replies from the client.

Februar 17, 2025 unter 8:30 pm #16716334

remigiusK

Hi Bruno, in the meantime I have installed the theme/plugin. I just need to reproduce the issue. Please bear with me until tomorrow. Thank you and regards, Remy

Februar 18, 2025 unter 7:30 am #16717043

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

Take your time, if you need any kind of an assistance let me know.

Februar 21, 2025 unter 2:47 pm #16734224

remigiusK

Hello Bruno, in the meantime I have installed everything and translated one tour into EN from DE. The booking system works but WP does not send any email out to the client or admin. Do you know anything about that? Is that possibly blocked by Sandbox. Thanks and regards, Remy

Februar 24, 2025 unter 7:06 am #16739021

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

You will not receive emails that come from sandbox, however, sandbox will record all the emails.

You can check them all here:
versteckter Link

Hover over any of these and you will see its content, along with whether it translated the strings.

emails.png
Februar 26, 2025 unter 7:54 pm #16753258

remigiusK

Hi Bruno, sorry of the delay. In the meantime I was able to reproduce the issue.
I have created to bookings and have sent the invoice.
(id:30) is a booking from the English Tour
(id:29) is a booking from the German tour

As you can see in (id:30) the invoice (sent by clicking the invoice button in the tour order) comes in German instead of English.

Let me know if you need further explanation. Thank you and regards, Remy

Februar 27, 2025 unter 9:29 am #16754742

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

So the issue can be reproduced like this?

- order versteckter Link (English)
- the first email is correct - in English
- but the "Invoice From WORDPRESS" is not, it is in German? So texts such as "Rechnung an" or "Teilnehmer Info" don't translate?

If so, how do I generate "Invoice From WORDPRESS"?

I scanned both "TravelTour" and "Tour Master" but I am not finding any of these strings, neither within admin strings.

invoicd.png
Februar 27, 2025 unter 8:47 pm #16758113

remigiusK

Hi Bruno,

- order versteckter Link (English)
- Automatic booking confirmation email will be sent correctly (language according to the page which the user has booked)
- If I send the invoice via the "Invoice Resend" button (See attachment) the customer gets it in German even the customer booked in the English page. So somehow WPML does not remember the tour and its language which the customer booked.

Thank you.

Kind regards,
Remy

Screenshot 2025-02-27 214537.png
Screenshot 2025-02-27 214509.png
Screenshot 2025-02-27 213858.png
Februar 28, 2025 unter 7:42 am #16759144

Bruno Kos
Supporter

Sprachen: Englisch (English ) Deutsch (Deutsch ) Französisch (Français )

Zeitzone: Europe/Zagreb (GMT+01:00)

I see that email strings are properly translated, but the resent email is still in the site default language.

This has been escalated to our Compatibility team and may take some debugging time, I'll get back to you as soon as I have any news or questions for you.