Home›Support›English Support›[Resolved] email notification which is sent to the customer's email address is not translated
[Resolved] email notification which is sent to the customer's email address is not translated
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with string translation for email notifications in the Hotel Booking plugin. Although the strings were translated, the emails were sent in the original language.
5. Delete all strings from WPML and resave the mail settings to re-register them. Then translate from English to other languages.
6. Ensure the string from the mail settings is always in English and then translate it using WPML > String Translation.
It's important to note that the solution provided might be outdated or not applicable to your case. If the issue persists, we recommend opening a new support ticket. We also 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.
Looks like the string translation is not working properly at this time. Although it shows that the text is translated, I receive it in the original language and not in the translated one.
it is an email notification which is sent to the customer's email address. I did a test and I got an email with the original text and not the translated one
Hello,
I added my theme and the Hotel Booking plugin to the sandbox website you sent me. I changed the language if WordPress to Hungarian as my wordpress backend is set up on Hungarian and I think that is where many if the issues occur. I didn't change any of the other settings or configurated anything else. Let me know if there is anything else you need me to do.
Thank you
I see that you haven't configured WPML. Can you please do the followings?
- Configure WPML as per your site.
- Translate the email texts as you did on your site.
- Write steps about how can I purchase a booking which sends out the email(s) to customer.
I've also added a plugin to Log Emails (in Tools -> Log Emails) to observe all generated emails.
Dear Hasan,
It will take me many hours of work to set up the Hotel booking plugin with all required details in order for you to be able to run a test booking.
Is there no other way you can look into the issue without having to do so on this sandbox website?
Thank you
I was able to setup rest of the stuff with a sample accommodation and booking related things.
And finally I observed that emails were going out correctly. If I placed a booking order in Hungarian in frontend, all the emails were in the same language (i.e. first email). Even if I updated booking status from admin panel, the subsequent emails were also in the same language (i.e. confirmation email, cancelled booking email and etc.), regardless of my selected language in "admin".
The same case was with English language.
I then observed your site again for email texts and noticed that some texts were having wrong language (see attached).
If you notice, that some texts were in Hungarian but registered as English. While a few (perhaps one or 2) were even had the same Hungarian text in both languages.
So I've corrected most of these. Please review again in ST for each text of email (i.e. Subject, Header and Email template texts) and correct as necessary (if needed). And this should be working fine now.
In the sandbox, you can observe the emails in relevance to the bookings at hidden link.
I really do not understand how that is possible, on my end all strings were in the correct language. I actually made sure to go over all these strings before contacting you and make sure they are translated properly and are appearing in the right language. I now rechecked them and they are all correct, still I tried to book accommodation again and the email sent was in the original and not in the translated language.
I can check again in your site by ordering bookings, so I can receive real emails. I didn't check this before considering it a live site and not to mess with your data.
Please let me know if this is OK to test in your site?
I just tried it, my frontend language was English.
I received 3 different emails:
- Pay for your booking (pay.jpg) -> English.
- After I confirmed the booking from WP Admin, received another email (confirmation-2.jpg) -> Mix of Hungarian and English.
- After a minute, got another email "Check-in confirmation" (confirmation.jpg) -> English.
Did you receive all these in default language too? And can you check if the one about confirmation you received (in your previous test) is also a mix of languages?