I am building a website with gatsby and hosting it on netlify. The website is available in two languages, french and english.
I want to redirect users from “/whatever” to either “/fr/whatever” or “/en/whatever” based on their browser language. I am using gatsby-plugin-netlify to create redirections using the following code:
This appends the following code to my _redirects file (which looks legit to me):
/pricing/ /fr/pricing/ 302 Language=fr
Now when I navigate to my website on /pricing and my Chrome settings show french as my only language, I expect to be redirected to /fr/pricing. It is not working as expected, no redirection is happening. Same behavior with Firefox, but in Safari it’s working well, I am redirected to /fr/pricing.
Unfortunately, we have known issues around the odd behavior with language redirects that our team is looking in to. We do not have any workarounds at the moment. We’ll update here once we have more information.
Hi, @philschonholzer, and welcome to our Netlify community site.
The issues tracking this are still open. This forum topic is cross-linked with the open issues and we will post an update here if/when these issues are resolved. There is no official ETA of when this might occur though.
If there are other questions, we’ll be happy to answer.
4 years and still waiting for this feature that is “supported” according to the docs.
You could at least add a piece of documentation so people know it doesn’t work.
Hey! Given there’s no timeframe on our open launch of Edge Handlers, it’s worth keeping this topic around to discuss alternatives (and to critique the existing implementation, if so!)