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.
Solution:
1. Keep the original English text on the site.
2. Delete the strings related to these emails from WPML's String Translation.
3. Retrieve the strings by following the guide: https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#update-theme-plugin-translations
4. Clear or disable cache while following these steps.
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.
If further assistance is needed, please contact us in the WPML support forum: https://wpml.org/forums/forum/english-support/
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.
Tagged: Documentation request, Exception
This topic contains 43 replies, has 3 voices.
Last updated by Alejandro 1 year ago.
Assisted by: Alejandro.
Author | Posts |
---|---|
December 22, 2023 at 9:29 am #15115235 | |
zoltanS-10 |
Doesn't seem to work on my side. All strings are set up as Hungarian and the changes I made don't appear in the string. I made the changes while the backend is set to English. |
December 22, 2023 at 9:42 am #15115493 | |
zoltanS-10 |
I checked and for me the changes are appearing here. The changes are appearing in the Hungarian language even though I was editing the email when the setting were on English. |
December 22, 2023 at 2:17 pm #15118385 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
I see, interesting. you know there are actually 3 mails that are created in the same way, the one when you make the booking, the one when you get it accepted and the one when you get it cancelled. the first one, when you make the reservation is created in the same way as the other2 yet that one is always sent correctly, so this makes me wonder what difference the other 2 have with this one. At this point, can you please upload the theme here: hidden link - then: create a booking element and set the 3 different mails. Do not translate anyhing yet, i want to first check what's the "initial status" of the plugin when it comes to these mails and then run a few tests there with our devs, to try to figure out what's the "default" behaviour on a "clean" website and understand better how to fix it on yours. Thanks in advance (don't worry about licenses and stuff, they usually are required only to update the plugins and themes. you can download the plugins from your website if needed by using a plugin like this one: https://wordpress.org/plugins/download-plugins-dashboard/ ). |
December 22, 2023 at 7:14 pm #15121601 | |
zoltanS-10 |
Ok, I added the theme and HB plugin and created one accommodation type. |
December 27, 2023 at 9:51 am #15131399 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01: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? Let me know. |
December 27, 2023 at 11:00 am #15131720 | |
zoltanS-10 |
Here it is: |
December 27, 2023 at 11:41 am #15131909 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Ok, let's try to do something: - Check that the same version from the sandbox is in your site. 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. |
December 27, 2023 at 2:52 pm #15132495 | |
zoltanS-10 |
I don't know what is going on here: |
December 27, 2023 at 3:33 pm #15132591 | |
zoltanS-10 |
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: |
December 27, 2023 at 3:47 pm #15132634 | |
zoltanS-10 |
Ok, last conclusion: hidden link |
December 27, 2023 at 4:29 pm #15132864 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01: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 🙂 |
December 28, 2023 at 11:08 am #15134266 | |
zoltanS-10 |
Thank you, it seems to be working now. finally! |
December 28, 2023 at 2:39 pm #15135166 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Yes, the ticket will remain open so i can inform you of the updates or a future fix as soon as we have one. Things are a bit slow during the holidays, that's why i wanted to find a workaround for you, so you could move on in the meantime 🙂 I'm changing the status of the ticket so it doesn't get closed automatically and will keep you on the loop. Regards. |
December 28, 2023 at 5:42 pm #15135554 | |
zoltanS-10 |
Thank you! That's very kind of you. |
December 29, 2023 at 2:53 pm #15136974 | |
Alejandro Supporter
Languages: English (English ) Spanish (Español ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
I'm changing the status of the ticket to avoid it from getting closed. i'll keep you informed. |