Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue with WooCommerce email translations not being correctly applied to custom texts in customer emails. The emails are being sent in the default Greek language instead of the translated language, despite the strings being scanned and translated.
Solution:
We recommend isolating the issue by moving the custom code related to email translations to a different section of the theme, such as

header.php

, to verify its functionality. Since our support policy does not cover assistance with custom coding, we suggest setting up an isolated test environment. This will allow us to review the code without affecting the live site. If the problem persists, please check our related known issues and ensure you have the latest versions of themes and plugins installed.

If this solution does not resolve the issue or seems outdated, we highly recommend opening a new support ticket. You can do so here: WPML support forum.

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.

Our next available supporter will start replying to tickets in about 7.01 hours from now. Thank you for your understanding.

This topic contains 5 replies, has 2 voices.

Last updated by Marcel 2 months, 2 weeks ago.

Assisted by: Marcel.

Author Posts
July 23, 2024 at 8:21 am #15991182

fotisH

Other than the above, we are now facing another issue, related to the Woocommerce Email Translations. We have an override for the customer email in our theme, we have scaned and translated the strings, but the customer doesn't receive the email in the correct language. He is getting the email in the default Greek language. Please, check the attached screenshots of our setup.

Please, note that only the custom texts are not translated. The rest of the default content of the email is successfully translated.

Could you please help on this last mentioned issue? What are we doing wrong exactly?

Thank you in advance,
Dora

July 23, 2024 at 8:34 am #15991264

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi Dora,

Based on the documentation, it seems you translated the wrong text domain. We display the admin_ text domain, which loads strings from the backend (options table). It looks like you translated the default WooCommerce strings instead of the customized ones.

Best Regards,
Marcel

July 23, 2024 at 8:46 am #15991314

fotisH

Hi Marcel,

Our case here is not the admin texts of the emails. The email subject for example is translated successfully on our end and the customer is getting the correct response.

The issue is about Translating Custom-Coded WooCommerce Emails, as described here: https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce-emails/#translating-custom-coded-woocommerce-emails.

For example, I am attaching a screenshot of the email template and the corresponding translation that doesn't take effect.

text_translation.jpg
template.jpg
July 23, 2024 at 11:06 am #15992170

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

our example on the doc uses <?php printf( _e - which immediately echoes the translated string. Did you try that already?

Best Regards
Marcel

July 23, 2024 at 3:27 pm #15993168

fotisH

I have just tried this also. Nothing changed.

July 23, 2024 at 4:31 pm #15993565

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

Please note that our support policy does not include assistance with custom coding. If you can provide us with an isolated test environment, we can review the code to check its correctness. However, we cannot verify if the priority or other specifics are handled correctly within your theme.

It's best to isolate this first and add the code to another section, such as header.php, to see if it works.

Best regards,
Marcel

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.