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.
Ok, I added the theme and HB plugin and created one accommodation type.
I made sure to set the website to Hungarian as the default language before adding the HB plugin.
All emails were already set up in Hungarian so everything should be set up.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02:00)
I ran a simple test here, without translating anything but with WPML enabled and these were the results: hidden link
1) I didn't translate any mail and they were in English, not hungarian, yet you said the mails were already setup in hungarian, where did you see that?
2) Noticed, how, unlike on your website, when i switched languages in the language switcher, it did it correctly. this means that there's indeed a cache in your server or an issue in your database that is creating this. since the problem was in very specific pages, it looks more like a cache issue on the server level than anything else.
As i ask in the video, can you please tell me where did you translate the content but specially if i missed a step or did something different from what you usually do, and if that was the case, can you try to record yourself and show me how you run the steps so i can make sure i follow the same exact steps?
Then check if the problem disappears on your end as well but make sure that things like caches are turned off from the server or at least flushed constantly while following the steps from above.
I tried playing with it a bit more. I am even more confused. But anyway, it is somewhat working now, so I will go and write all the translations where I think they should go now so at least the customers will be getting the email in the right language until you guys figure out what is happening here: hidden link
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02:00)
I had given you a workaround before that turns out is the only way to make it work. however back then i didn't know all the steps i needed to actually give you a step by step instruction on how to follow the workaround.
Please follow this video to understand what to do in the meantime: hidden link
I recreated the same problem on the sandbox which suggests that there is indeed a bug somewhere, very likely on Motopress' compatibility code. our compatibility devs will take it from here and contact the motopress authors about this.
-----------------
In case you're interested here's the main problem:
- Motopress registers 2 strings but only one is needed, the one with the domain "Motopress Hotel Booking". it makes things confusing but it's not going to create any particular issue.
- The issue comes when you change the default language of the string (English), once you do that, motopress doesn't seem to catch the original string anymore and creates a lot of weird issues, one being that the mails are never shown in the correct mail but always in the one you created in the settings.
- In order to have it fixed, you need to make sure the string from the mail settings is ALWAYS in English and then translate it from WPML > String Translation, making sure the string there appears as English.
The best way to go here is to delete all its strings and then resave the mail settings so they are re-registered. then translate them from EN to the other languages and that will help you solve the problem, at least temporarily while we find a permanent solution 🙂
Thank you, it seems to be working now. finally!
Do we keep this ticket open or you guys will continue investigating but there is no need for any further steps to be taken from my side?
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Rome (GMT+02:00)
Hello!
We checked in the latest version of both WPML and Motopress and the problem wasn't there anymore.
It seems the "english" language is actualy forced on purpose by Motopress so that is likely to be there and that means that you should write the content in English and then translate it. just as i explained here: