Multi-language checkoout?

Multi-language checkoout?

Oshun1899
Visitor
2 0 2

Hello,

 

I have a store that supports english, catalan and spanish and its default lanugage is english. Everything works smooth with the 3 languages in the store, except at checkout, which is only available in the default language (in this case, english)

 

Users can switch between languages as they wish in the store so it is weird to only have the checkout part in english. I've tried a lot of different solutions and apps, but for now, the only thing that works is appending to the checkout URL the locale="es" or locale="ca" part... The thing is that I don't know how to automatize it on the Dawn theme.

 

I've found some useful resources on the internet about this problem but so far I haven't been able to fix it:
https://community.shopify.com/c/shopify-discussions/how-can-i-set-up-multilingual-checkout-on-my-web...

https://community.shopify.com/c/international-commerce/how-to-fix-language-issue-on-my-checkout-page...

And yes, of course all my translations for the tree languages are in place... What's going on? Is this a known problem in Shopify? How can I fix it?

 

Thanks a lot 🙏

Reply 1 (1)

enthusiasm
Tourist
4 1 0

It sounds like you're running into an issue with Shopify's multilingual checkout, which can be tricky to set up. By default, Shopify checkout only works in the store's default language, but you can automate language switching by adding some custom code. Here's how you can do it:

  1. Go to your Shopify admin, and under Online Store > Themes, click Actions > Edit Code.
  2. In your theme’s header.liquid or theme.js file, add a script to detect the current language on the store pages.
  3. Then, modify the checkout link to dynamically append the correct locale based on the user's selected language.

For example, use JavaScript to capture the language switch and redirect users to the checkout with the correct locale parameter:

 

const lang = Shopify.locale; // Detect selected language
const checkoutUrl = `/checkout?locale=${lang}`;

 

Make sure to test this on the checkout page to ensure it works smoothly.

Please kindly get back to let me know if this worked for you, and feel free to mark this as a solution!