Skip Navigation

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: 

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.

2.jpg
1.jpg
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.
Yes, that is exactly what I am trying to do, and will look at the link you sent.
I will let you know how it went, hopefully, so well that we can then close this topic soon. ๐Ÿ™‚

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 localized the order email and found the strings in the text - I changed the text to test, and yes - that is the one email!

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 even translated my Woocommerce product completely to the default language and nothing changed (I only have one product thankfully), 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.

I have been sitting on this problem for 8 hours.
Please help me. I am attaching some screenshots. The order confirmation/invoice should be at least in English, if not in my default language German, but they are still all translated ๐Ÿคจ to the language chosen by the user.

many thanks

Screenshot 2023-01-21 at 14.52.10.jpg
Screenshot 2023-01-21 at 14.52.40.jpg
Screenshot 2023-01-21 at 14.41.45.jpg
January 21, 2023 at 2:45 pm #12864319

melitaR

I forgot to attach the order images of parts which are still showing up wrongly.
here you go.
thanks

2.jpg
1.jpg
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.
The table is still in the user's language the strings which were available and visible and which I just changed are in German.
I have no strings for the table or the address collected in the e-mail.
See screenshot.

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..
many thanks in advance

thanks

Bildschirmfoto 2023-01-23 um 13.22.05.png
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. ๐Ÿ™Œ
thanks a million!
best

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.

translated-to-german.png
strings.png
translated-email.png
January 25, 2023 at 7:52 am #12886577

melitaR

Hi,

and I appreciate you taking a closer look into my problem ๐Ÿ™‚
I will surely try that out today, I see you located the strings I could not find, this might really help

I'll let you know how it went.
thanks again
best

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.
The other strings I see in your screenshot, like "Hi, Order... & Payment method" I had to search for among the Woocoomerce strings. As you know the list of Woocoomerce strings is long, if I say - search exact string then I have to know what it is up to a comma or dot or double dot, as it otherwise doesn't show. If I look generally (which I btw did) I either cannot find them or they are in the right language already, so it cannot be those strings..

So I was only lucky translating what I could because those strings were in your screenshot.
Now my confirmation mail looks like this, with still 4 strings I cannot locate, and the date still showing in the user's language (that was the string [Order #%1] (%2$s)).

I have chosen Bulgarian as the language to demonstrate, it is easier to locate those strings:

thanks

Screenshot 2023-01-25 at 17.14.00.jpg
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.
-I f you do not see the wp-admin/FTP fields, your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to hearing back from you.

translated-email.png
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.