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 6 Antworten, hat 0 Stimmen.

Zuletzt aktualisiert von Bruno Kos Vor 10 Stunden, 30 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.