Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to change the default text in the 'woocommerce-multilangual' plugin for WPML because the current notification text is unclear, causing users to mistakenly click the wrong button and empty their cart.
Solution:
We recommend using the WPML String Translation to 'translate' the original language text to the desired text, effectively changing it. This method involves treating the original text as if it were a foreign language and providing the desired text as the 'translation.' Alternatively, you can use the Loco Translate plugin, which allows editing of strings in the original language. However, please note that directly editing plugin files is not recommended as updates to the plugin will overwrite these changes.

If this solution does not resolve your issue or seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If necessary, do not hesitate to open a new support ticket.

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.

This topic contains 3 replies, has 1 voice.

Last updated by Lauren 2 weeks ago.

Assisted by: Lauren.

Author Posts
August 11, 2025 at 1:08 pm #17309975

patrickH-76

Background of the issue:
I am trying to change the default text in the 'woocommerce-multilangual' plugin for WPML. The current text is 'You've switched the language and these are items in the cart. If you keep the %s language, the cart will be emptied and you will have to add the items again to the cart.' I want to make it clearer to prevent users from clicking the wrong button.

Symptoms:
The text is unclear, leading to users clicking the wrong button and the cart being emptied.

Questions:
How can I change the default text for the language switch notification in WPML?
What is the best way to update the button text to prevent user confusion?

August 11, 2025 at 8:53 pm #17311479

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Before this ticket gets assigned to one of my colleagues, I will try to help.

You can try to follow the steps mentioned here:
https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings

This should allow you to change the default language of this string to another language that you DON'T have set up on the site yet, and that will enable you to add an EN translation for this string, which should allow you to use precisely the message that you want.

I hope that you will find this information helpful.

Kind regards,
Mihai Apetrei

August 11, 2025 at 9:18 pm #17311529

patrickH-76

It is not about changing the source language. It is about changing the default strings in the source language. Where to change the strings from wpml source? See attached files.

August 13, 2025 at 4:55 pm #17318621

Lauren
WPML Supporter since 10/2015

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this. WPML does not have the option for changing strings/texts in the original language. WPML uses String Translation to allow you to translate strings to secondary languages. What Mihai was suggesting above is a workaround that allows you to change the original language by "translating" it. The only other option would be to edit the plugin files directly, which I don't recommend because the changes will be overwritten every time the plugin is updated, or use something like Loco Translate plugin which does allow you to edit strings in the original language, not just secondary languages. I hope this makes sense. Please let me know if you have any further questions that I can help you with.