Skip Navigation

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

Problem:
If you're experiencing an issue where your site switches from English to German when adding a product to the cart, but the 'go to cart' bar remains in English, we can help.
Solution:
First, ensure that your WPML plugin and all related add-ons are updated to the latest version, currently 4.7.1. You can check for the latest versions and update instructions on WPML's installation guide.
Next, try changing the language URL format to 'Different languages in directories' by navigating to WPML → Languages → Language URL format in your site's backend. This adjustment might help maintain the desired language when adding items to your cart.
Remember to back up your database before making any changes to prevent data loss.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your specific case, we highly recommend checking related known issues on WPML's known issues page. Also, confirm that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket with us for further assistance.

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 1 reply, has 0 voices.

Last updated by babetter-2 8 hours, 12 minutes ago.

Assisted by: Andrey.

Author Posts
March 5, 2025 at 1:08 pm #16778725

babetter-2

Background of the issue:
I am trying to use my site in English, but when I add a product to the cart, the site switches to my default language, German. The bar saying 'go to cart' remains in English. Here is the link to a page where the issue can be seen: hidden link

Symptoms:
When a product is added to the cart, the site changes from English to German, but the 'go to cart' bar stays in English.

Questions:
How can I prevent the site from switching languages when adding a product to the cart?
Why does the 'go to cart' bar remain in English when the site switches to German?

March 5, 2025 at 5:36 pm #16780153

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for contacting WPML support.

The language parameter seems missing when you try to add a product to the cart.

Have you tried temporarily switching the language format to "Different languages in directories" in WPML → Languages → Language URL format? Check to see if the issue still exists after making this change.

First, please update your WPML plugin and add-ons to the latest version, 4.7.1, to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem; however, we need to work on the newest code available to troubleshoot the issue best.

You can check the latest released versions under "My Account -> Downloads" on this site. Instructions to update can be found here: http://wpml.org/faq/install-wpml/

If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.

Please remember to backup your database before you proceed.

March 6, 2025 at 8:43 am #16781782

babetter-2

Changing the language URL format did the trick, thank you! Even switching back to the old format made the page work again as expected. I still can't understand where the error came from but I'm happy to have it resolved!