This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where after translating a specific string 'You have received a Gift card' into Czech using WPML, both the Czech and English versions of the WooCommerce Email display the Czech translation instead of the original English text.
Solution: 1) Navigate to WooCommerce -> Settings -> Emails. 2) Click 'You have received a Gift card' to open it for editing. 3) Ensure that the language is set to Czech from the top admin bar. 4) Fill in the 'Subject' and 'Email heading' fields with the correct Czech translations, as these fields are placeholders and need proper localization. 5) Click 'Save changes'. 6) Go to WPML -> String Translation and click 'Not seeing strings that you are looking for?' to expand it, then click the Admin Texts Translation link. 7) In admin strings, search for the subject and email heading strings in Czech, select them, and click 'Add to String Translation'. 8) Return to WPML -> String Translation. 9) Search for one of the strings in Czech, select it, and click 'Change the language of selected strings' -> select 'Czech' to correct the language. 10) Translate the string to English. 11) Repeat steps 9 and 10 for the other Czech string. This process ensures that the Subject and Email Heading fields display correctly in the email according to the language of the order placed on the frontend.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we recommend opening a new support ticket. Additionally, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at 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.
Background of the issue:
I am trying to translate a specific string using WPML on my site hidden link. The string in question is 'You have received a Gift card' and its Czech translation is 'Obdrželi jste dárkovou kartu'.
Symptoms:
When I add the Czech translation in WPML → String Translation, both the Czech and English sites display the Czech translation instead of showing the original English text on the English site.
Questions:
Can I ask you for any advice please?...
Reference to our recent chat, I've moved to this ticket.
I've enabled your next reply as private to provide access to the test site. Please let me know when you're ready and I'll try my best to debug the issue further.
Can you please write me exact steps to reproduce the issue? For example, from initiating an order to receiving an email where this string appears (including any special product or gift card to be used in the process).
Thank you for the updates, I further checked about it by adding Cash on Delivery method and NTKY2W4X coupon to simplify the payment and checkout process.
I placed 2 different orders:
- 3156 (Czech language)
- 3162 (English language)
from the frontend. And when completed the order, got the email with subject "You've got a gift!". This email contains everything in English, regardless of the language the order was placed in (see attached).
You can also observe these emails in Tools -> Log Emails.
There are other order emails, some are in Czech too.
However, I think I'm missing some steps here to reproduce the issue. Can you please either write exact steps or record your screen while reproducing the issue in the test site? So I can then check again and debug further.
Hello, recored a video. The first video is recored in czech language. As you can see there the string "You've got a gift!" is not translated even in WPML it is translated.
Second video is recorded in english version. Im sending the screen shot of english version accidently i stopped video bit earlier..
Thank you for the updates, I can see the problem in the videos.
However, looks like you did this on the live site. While on the test site (hidden link), regardless of the order language, I'm getting that email always in English (even that title which is in Czech in your first video).
As per my understanding, that order language isn't being regarded for that email. I'll debug this further and 'll get back to you on Monday.
- screen-recording-1: This shows it working fine in the email.
- screen-recording-2: This shows the steps about how to fix it in your live site. The detailed steps are also listed below.
Steps to fix the issue in live site:
1) Go to WooCommerce -> Settings -> Emails.
2) Click "You have received a Gift card" to open for editing.
3) Make sure that the language is Czech from top admin bar.
4) Fill in the "Subject" and "Email heading" fields. The existing text you see in these fields are just the place holders and 'll not work as proper subject and heading in the email, unless you fill these fields properly. So please make sure that you fill these fields with Czech language subject and email heading.
5) Click "Save changes" button.
6) Go to WPML -> String Translation -> click "Not seeing strings that you are looking for?" to expand -> click "Admin Texts Translation" link.
7) In admin strings, search for that subject and email heading strings in Czech, one by one. Select it from left most check box and click "Add to String Translation".
8) Once both have been added, go back to WPML -> String Translation.
9) Search one of the strings in Czech, click the left most check box to select it, and click "Change the language of selected strings" -> select "Czech" to correct the language.
10) After correcting the language, translate the string to English.
11) Repeat #9 and #10 for other Czech string also.
That's all and now the Subject and Email Heading fields should be displayed properly in the email, as per the order language (i.e. the language the order was placed in the frontend).