Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello!
I set up a hydrogen app and implemented a language switcher. I have translated the handles for my collections. My problem now is that i can not figure out how to redirect to the translated handle (url) after changing language.
Example:
My url is http://localhost:3000/collections/elektronik-technik
I switch language to English and my url is http://localhost:3000/en/collections/elektronik-technik
What i want to achieve is this url http://localhost:3000/en/collections/electronics-technology
How can this be done? I can see that it is working if i use the Dawn theme so it has to be possible.
Thanks in advance!
Thank you for your reply and your help.
Unfortunately this still does not solve my problem. I think that i have configured my shop the right way. If i "deactivate" my custom storefront and active the dawn theme, i am successfully redirected to /electronics-technology. But if i change back to my custom storefront, the language is correct after i use the language selector, but my collection handle in the url still stays at elektronik-technik.
So i guess it has something to do with my logic.
The same applies to my products. The language is correctly changing as my content does. But the url-handle stays the same.
Maybe you have some other hints for me 🙂