Headless commerce and custom storefronts with Shopify APIs and SDKs
We are using the Storefront API to fetch more than 50 products at once on the Products QueryRoot Object with an array of IDs. This runs very smooth and fast, so no problem here. We have also translated product data with the Admin Translation API by a self-made custom app which fetches products from an ERP automatically. Runs smooth too, so there is also no problem here.
BUT – if we use the i18n language codes to switch the translations in the URL, e.g. from https://supershop.com to https://supershop.com/fr and then using the /api/graphl endpoint, it still gives us the standard language data from the product and NOT the translated french language data.
Is there any possibility that the endpoint recognizes that I am doing my request from a translated shop url?
Solved! Go to the solution
This is an accepted solution.
Try adding an Accept-Language header to the request, as documented here: https://shopify.dev/tutorials/support-multiple-languages-with-storefront-api#retrieving-storefront-a...
This is an accepted solution.
Try adding an Accept-Language header to the request, as documented here: https://shopify.dev/tutorials/support-multiple-languages-with-storefront-api#retrieving-storefront-a...
Thanks, this did the trick!
This solution doesn't work anymore since the documentation have changed
For me event after getting multiples languages with localization none of them work if I use @inContext(language: ES) for exemple
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By