Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 3 replies, has 0 voices.

Last updated by Prosenjit Barman 1 month, 1 week ago.

Assisted by: Prosenjit Barman.

Author Posts
November 21, 2024 at 1:17 pm #16429168

dirkV-7

Background of the issue:
I am trying to ensure that when someone adds a product in one of the translated languages (DE, EN, FR) on my site hidden link, the page remains in the selected language. The 'Add to cart' button is translated.

Symptoms:
When a product is added to the cart in a translated language, the page changes back to the default language Dutch, specifically to the product page in the default language. The '/?lang=fr' is removed from the link.

Questions:
Why does the page revert to the default language when adding a product to the cart?
How can I maintain the selected language after adding a product to the cart?

November 22, 2024 at 8:47 am #16432464

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're facing. It’s possible that some essential WooCommerce pages are missing in the other language, which could cause the language to switch back to the default language when you add items to the cart. Please navigate to 'WooCommerce > WooCommerce Multilingual > Status' and check if there are any warnings or errors, particularly related to WooCommerce Store Pages.

If you notice any, click on the "Create Pages" button to create the default WooCOmmerce pages for other languages.

If the issue persists even after that, please try the following steps:

- Please go to WPML > Suupport > Troubleshooting
- Click on the following buttons:

-- Synchronize posts taxonomies [Select 'pages' and then click the button]
-- Clear the cache in WPML
-- Remove ghost entries from the translation tables
-- Assign translation status to duplicated content
-- Set language information
-- Fix post type assignment for translations

- Once done, clear the caches from your site and browser.
- Resave the permalink structure by going to "Settings > Permalinks" and then check again.

Please try and let me know how it goes. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

November 29, 2024 at 10:10 am #16458673

dirkV-7

Hello again,

I have tried all steps, and nothing has changed.

December 2, 2024 at 4:30 am #16464129

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
I hope you're doing well. Sorry for the delay in responding due to the weekend.

If the issue persists even after making sure that the default WooCommecre pages exists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. 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 which means only you and I can see and have access to 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.
-If you do not see the wp-admin/FTP fields this means 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 your response.

Best Regards,
Prosenjit

The topic ‘[Closed] “Add to cart button” changes language to default language’ is closed to new replies.