-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Langauge for checkout #943
Comments
I have the same issue. Try clearing cache, reload the site, go to checkout again. That should work. But the problem is it only works the first time. Once the client initialized, the checkout is cached, so any subsequent language changes don't have any effect. I tried re-initializing the client once the user switches to a different language on headless site, but the checkout persists in using the language that was set on initial load. I was told on Shopify Discord I have to set |
I have the same problem and @ansmlc solution does not work with me with Thanks |
I ended up doing a fundamental update of the web-shop to use the storefront graphql api and now I have full control. I like shopify-buy lib, it get's you going quickly, but it also has serious limitations (as also stated in docs). Would be great it extendability was easy/do-able. |
Thanks @felixknox For the simple redirection I wanted to do going for the storefront is overkilling... |
@SanchezWarren @felixknox The language parameter should work if you've also set the corresponding languages in Shopify -> Settings -> Languages, with one language being set as default. With that in place, it's than possible to switch Checkout language in real-time based on user-selected headless site language. This is what works for me:
|
Thank you @ansmlc. This is working for me. 🌟 Only note is that I could only access the current language on |
Does this also change the currency that is returned? |
Hi
I am using js-buy-sdk for a headless web-shop.
"shopify-buy": "^2.18.0",
My shop supports two languages.
ja-JP and en-US.
When I buildClient and adding parameter like this (hardcoded for test purpose)
const client = Client.buildClient({ domain: process.env.NEXT_PUBLIC_SHOP, storefrontAccessToken: process.env.NEXT_PUBLIC_ACCESS_TOKEN, language: 'ja-JP', });
As stated in the docs
It still takes me to the english checkout.
I can confirm that the JA version of checkout works as I can navigate to that via the none-headless version of the web-shop.
But using this lib I am unable
Please advice what I am doing wrong.
The text was updated successfully, but these errors were encountered: