On this page
What this issue is
A visitor adds products to a cart or starts a form, then uses the language switcher. They land on the translated page and the cart is empty, or the form fields are blank. The data was not deleted on purpose. The new page simply cannot see it.
Common causes: the languages live on different domains (example.com and example.fr) so cookies are not shared; the cookie is set for one subdomain only (www versus fr); the translation plugin keeps a separate cart per language; the switcher is a full page reload that drops form input; or the URL change drops a cart token or session parameter.
Why it costs you leads or sales
The people who switch language are often the ones who need it to understand the offer or the checkout. They have already shown intent by filling a cart or a form. An empty cart after the switch looks like a bug, and many will leave instead of rebuilding it. It also hides in your reports: the loss looks like ordinary abandonment.
Example: out of visitors who switch language with items in the cart, how many go on to buy. Numbers are illustrative.
- Add to cartItems stored in session
- Switch languageNew domain or session starts
- Cart pageCart shows empty
- CheckoutNever reached
The cart is lost at the language switch, so the later steps never happen.
How to check if your site has it
Open a private window
Start with no cookies so you see what a new visitor sees.
Add a product to the cart
Note the product, quantity and any discount code.
Switch language with the site switcher
Do not edit the URL by hand. Use the real switcher on the cart page and on a product page.
Open the cart and checkout
Check items, quantity, coupon and shipping country are all still there.
Repeat with a form
Fill half a lead or checkout form, switch language, and see whether the fields keep their values.
Check the cookies
In browser DevTools, open Application > Cookies. Compare the cookie domain before and after the switch. A new domain or a new session cookie value points to the cause.
How to fix it
The right fix depends on how your languages are set up. Pick your platform below. If the languages are on separate domains, browsers will not share cookies between them, so you need to pass the cart across with a token in the link or use one domain with language folders.
Use one domain for all languages
In your translation plugin (for example WPML or Polylang), choose language in directories (
/fr/) rather than per-domain where you can. Cookies are then shared.Check cart and session settings
If you use WooCommerce with WPML, make sure the cart is kept when the language changes. WPML has a WooCommerce Multilingual setting for this. Check the plugin docs for your version.
Exclude cart pages from caching
Make sure the cart, checkout and account pages are not cached per language, so the cart fragment loads correctly.
Use Shopify Markets language selector
Under Settings > Markets, use languages on the same domain or subfolders. The cart is kept when the customer changes language in the standard selector.
Avoid separate domains where possible
If a market uses its own domain, the cart does not follow the visitor across domains by default. Test it, and prefer subfolders if cart loss shows up.
Check theme or app switchers
A custom switcher that links to a different store URL can start a fresh cart. Use the Markets language selector in your theme.
Use Webflow Localization subdirectories
Locales on subdirectories share one domain and one cart or session. Test Ecommerce carts after switching locale.
Check locale links in forms
Webflow forms do not carry values to the other locale. Warn visitors, or place the switcher away from forms.
Use Wix Multilingual
Use the built-in language menu so the site stays on one domain. Then test the cart after switching.
Avoid duplicate sites per language
Separate sites do not share carts. Move to one multilingual site.
Check how languages are built
Squarespace has no built-in multilingual cart. If you use separate sites or a third-party tool, the cart will not follow. Test it and consider one store with translated content.
Share the session cookie
Set the cookie domain to the parent domain (
.example.com) so all subdomains read it. Keep the session ID, not the language, as the cart key.Preserve form input
Save field values to
sessionStoragebefore navigating and restore them on load. See the snippet below.Pass a cart token across domains
If you must use separate domains, add a signed cart token to the switcher link and have the target site load that cart.
document.querySelectorAll('a[data-lang-switch]').forEach(function (link) {
link.addEventListener('click', function () {
var data = {};
document.querySelectorAll('form input, form textarea, form select').forEach(function (el) {
if (el.name && el.type !== 'password' && el.type !== 'file') data[el.name] = el.value;
});
sessionStorage.setItem('formDraft', JSON.stringify(data));
});
});
window.addEventListener('DOMContentLoaded', function () {
var saved = sessionStorage.getItem('formDraft');
if (!saved) return;
var data = JSON.parse(saved);
Object.keys(data).forEach(function (name) {
var el = document.querySelector('[name="' + name + '"]');
if (el && !el.value) el.value = data[name];
});
sessionStorage.removeItem('formDraft');
});Before
- Switcher links to another domain
- New session cookie is created
- Cart is empty and form is blank
After
- All languages share one domain or a cart token
- Same session cookie is kept
- Cart and form values survive the switch
How to confirm it's fixed
- Cart keeps products, quantity and coupon after switching language
- Checkout opens in the new language with the same cart
- Half-filled form keeps its values, or the visitor is warned
- The session cookie value is the same before and after the switch
- Works in a private window and on mobile
- Works from the cart page, product page and checkout
How to prevent it happening again
Add the language-switch test to your release checklist. Run it after changing translation plugins, themes, domains, cookie or cache settings, and after adding a new language. Keep the languages on one domain when you can.
How FunnelGuard handles this
FunnelGuard does not check this yet. A language switch that empties the cart is a possible future check, but it is not built today.
What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, check each step and the tracking hits, and confirm test leads reach the inbox and CRM. If a broken cart stops a journey you have set up, that journey can fail at the step where the cart should be. It does not test switching language in the middle of a journey.
The visitor switches language and the new page has no cart.
Questions people ask
Why is my cart empty after I change the language?
The translated page is probably on a different domain, subdomain or session, so it cannot read the cookie that holds your cart. It can also be a translation plugin that keeps a separate cart per language. Check the cookie domain before and after the switch.
How do I keep the cart when switching languages on Shopify?
Use the Shopify Markets language selector with languages on the same domain or in subfolders. A custom switcher linking to another store URL can start a new cart. Always test with items in the cart.
Why does the language switcher clear my form?
The switcher loads a new page, and the browser does not carry typed values to it. You can save field values to sessionStorage before the click and restore them on the next page. This works only on the same domain.
Does WPML keep the WooCommerce cart when I change language?
It can, if WooCommerce Multilingual is set up correctly and cart pages are not cached per language. Test it with items in the cart. Check the plugin's documentation for your version.
Do separate domains for each language lose the cart?
Yes, by default. Browsers do not share cookies between different domains, so each domain starts a new session. Use one domain with language folders, or pass a signed cart token in the switcher link.
How do I test if a language switch loses data?
Open a private window, add an item to the cart, then use the site's own language switcher. Check the cart, the checkout and a half-filled form. Compare the session cookie before and after in DevTools.
Can FunnelGuard detect a cart lost on language switch?
Not yet. This check is not built, so use the manual test. FunnelGuard does run your real journeys on a schedule and checks each step, which may show a broken cart if it stops a journey you have set up.
Related issues
- CNV-336Language switcher goes to 404Fix guide
- CNV-338Translated page has untranslated form or errorsFix guide
- CNV-339Geo-redirect sends visitors to wrong country siteFix guide
- CNV-341Currency switcher doesn't change pricesFix guide
- CNV-342Prices shown in wrong currency for countryFix guide
- CNV-344hreflang points to wrong pageFix guide