Closed i8ramin closed 5 years ago
related issue -- https://github.com/ikhudo/gatsby-i18n-plugin/issues/4
Wasn't getting much response, so decided to fork the project and continue work on it to fit our needs
Is there any updates on this topic ?
@i8ramin is your fork available somewhere?
@i8ramin is your fork available somewhere?
+1
@i8ramin is your fork available somewhere?
+1
+1
@i8ramin is your fork available somewhere?
+1
+1 @i8ramin 🙏
hi @5tormTrooper, unfortunately I no longer have access to the fork/repo .. but the this closed PR has some of the logic needed to make this work .. look at this file specifically:
https://github.com/ikhudo/gatsby-i18n-plugin/pull/5/files#diff-1962e97a9359cbf6f44c5e3d398ee95e
Thanks for getting back. I'll check it out and post a new fork for anyone else who comes across this.
Added an optional param
redirect
that will do the following:/path
to/en/path
/en/*
pagesMotivation here is that for the default language (ie,
en
), we want the site to behave as normal. Without any language specific paths. But for all other supported/available languages, we want to generate those pages.One caveat here is that the redirect logic is now disabled and it is up to the author to determine when to redirect a user to the appropriate language based on their browser settings. We typically handle this at the Edge (ie, Fastly VCL) using geo-targeting and redirects.