This thread is resolved. Here is a description of the problem and solution.
Problem:
Send WooCommerce emails in the website's default language to all users, no matter what language the order is placed in.
Solution:
The way to achieve that is to find all strings from the emails and add the original language text to all translations. To find the emails strings, you can follow this doc: https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce-emails/.
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: Exception
This topic contains 19 replies, has 2 voices.
Last updated by melitaR 1 year, 3 months ago.
Assisted by: Ahmed Mohammed.
Author | Posts |
---|---|
January 19, 2023 at 4:56 pm #12853165 | |
melitaR |
Tell us what you are trying to do? Is there any documentation that you are following? Is there a similar example that we can see?Hello my site uses 13 languages, German is the default main language. I have mainly used the automatic translator and translated the order email that goes to the customer. As my site contains a course where only the course order and participation should be in the chosen language, this order confirmation with the price breakdown (invoice) should not be translated and should only appear and be sent in German, as the tax and finance ministry requires this. I found several strings that I could change back to German, but still some parts of the mails are in the language the user uses, not in German. How can I locate all the elements and change them all to German? The form is filled out by Woocommerce. Thank you very much! btw: my page is in maintenance modus as it is not online yet, so I can only send the link with the credentials if needed. many thanks. |
January 20, 2023 at 2:43 pm #12860517 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, Thank you for contacting WPML support! I understand you want to send WooCommerce emails in the default language and delete their translations. If that's the case, you'll need to follow this doc to find the strings and delete their translations: https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce-emails/. Please make sure to check the Changing Default Translations section. As WooCommerce loads the translations automatically, you'll need to find those strings and remove or replace the loaded translations. Hope that helps, and let us know if you have any other questions. We would be happy to assist further. |
January 20, 2023 at 3:37 pm #12860915 | |
melitaR |
Hi Ahmed, thanks for replying. many thanks and enjoy the weekend. |
January 20, 2023 at 4:20 pm #12861055 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, > I will let you know how it went, hopefully, so well that we can then close this topic soon. ๐ Sure! Please let me know how it goes! > many thanks and enjoy the weekend. Have a wonderful weekend ๐ |
January 21, 2023 at 2:44 pm #12864251 | |
melitaR |
Hi Ahmed, so here is my update and it is still not satisfactory. I checked the domain and those strings are not translated, and those strings I can locate show up perfectly. BUT: there is this table with the price and product breakdown and the address information at the end that I can't locate. I have been sitting on this problem for 8 hours. many thanks |
January 21, 2023 at 2:45 pm #12864319 | |
melitaR |
I forgot to attach the order images of parts which are still showing up wrongly. |
January 23, 2023 at 12:02 pm #12872435 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, > I have been sitting on this problem for 8 hours. I totally understand. This is a bit unusual situation, and I will explain in a bit. > I searched for the individual strings like Order, Quanitity, Price etc. you can see nested in the table and found them in Woocommerce and they were translated, I deleted them - nothing changes so it must be the wrong domain, wrong string. WooCommerce loads the translation automatically from .mo files. So what is needed to be done here is to override those translations. So for example, for the string you have shared, you can add the German text for the other languages. Could you please try that with one string and let me know how it goes? Looking forward to hearing back from you. |
January 23, 2023 at 12:32 pm #12872615 | |
melitaR |
Hi thank you. Yes, I have added the German text to all the translations in all available strings concerning this e-mail. So I tested the order process in Polish, and still the same output: only part of the invoice/order confirmation sent to user is in German, the most part is still in Polish. Also, the Order Key is only in English, I have translated 2 Strings called "Order Key" only to German (Leranpress (LMS by Eduma theme) & Woocoommerce), but no String called "LP Order Key" as in the mail is available anywhere. This is a default Woocoomerce invoice so there should be aa possibility to control the translations, I think.. thanks |
January 23, 2023 at 4:52 pm #12874981 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, Thank you for providing the additional information. I've created this testing website (login URL: hidden link), and I'm going to try replicating the issue and monitoring the sent emails using email logging plugin. I'll keep you posted ๐ |
January 23, 2023 at 6:32 pm #12875259 | |
melitaR |
Hi that is fantastic and highly appreciated. ๐ |
January 24, 2023 at 10:30 am #12879827 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, I appreciate your patience while I was working on this. As you can see in the attached screenshots, this is an email sent after purchasing a product in French. I translated some strings (not every string to show the different texts in one email) into German, and in the other screenshots, I showed the strings I translated to German and how I added the German text in the translation of the French texts. I followed this doc https://wpml.org/documentation/related-projects/woocommerce-multilingual/how-to-translate-woocommerce-emails/ to bring all WooCommerce strings to my String Translation page and started adding German translation to the French texts as shown in the attached screenshots. This forces WooCommerce to load the German texts in French emails. Hope that helps, and let us know if you have any other questions. We would be happy to assist further. |
January 25, 2023 at 7:52 am #12886577 | |
melitaR |
Hi, and I appreciate you taking a closer look into my problem ๐ I'll let you know how it went. |
January 25, 2023 at 11:15 am #12889013 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, > and I appreciate you taking a closer look into my problem Always happy to help ๐ > I will surely try that out today, I see you located the strings I could not find, this might really help Sure! Please let me know how it goes! Looking forward to hearing back from you. |
January 25, 2023 at 4:39 pm #12892231 | |
melitaR |
Hi Ahmed, so, I was able to translate all the strings I also see in your screenshots. I had to search for them individually and they were really hard to find: if I go to the e-mail and say to a certain setting "go to string translation" it shows me only those as strings I have sentences for, for example; "Just to let you know, we received your order..." those editable messages in the backend are automatically shown when I go to string translations via Woocommerce E-Mails in settings. So I was only lucky translating what I could because those strings were in your screenshot. I have chosen Bulgarian as the language to demonstrate, it is easier to locate those strings: thanks |
January 26, 2023 at 11:43 am #12897077 | |
Ahmed Mohammed Supporter Timezone: Africa/Cairo (GMT+03:00) |
Hi there, You have done a fantastic job! Regarding those four strings, as shown in the attached screenshot, I could locate them and change the French translation to German, including the date. About the date, it needed an extra step to register the months' names that's explained here: https://wpml.org/forums/topic/no-translation-of-language-on-date/#post-10762833. I can take a look at your installation and help register those strings. It would be better to have a testing site where the issue is replicated. You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private, meaning only you and I can see and access it. Maybe I'll need to replicate your site locally. For this, Iโll need to temporarily install a plugin called โDuplicatorโ or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved, I will delete the local site. Let me know if this is ok with you. IMPORTANT - Please backup site files and database before providing us access. Looking forward to hearing back from you. |