You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
So when you're on www.example.com/en/projects/house
and from there want to link to www.example.com/en/contact
it redirects to www.example.com/en/en/contact and thus goes to the error page.
Does it have something to do with the base url being built with the languageCode inside the router js file?
Thanks for any input!
Edit NOTE:
This only happens when deployed, it doesn't happen on localhost dev. (Maybe a Vite thing?)
The text was updated successfully, but these errors were encountered:
Hi, did you have any chance to look into the issue? It would be happy for any hint how to solve it as I am currently working on a multi-language setup and can't get the language switch to work.
johannschopplich
changed the title
Multi-language: linking from a non-top-level url to a top-level url appends language code twice and thus redirects to the error page
Language code duplication in URL causes error page redirection
Mar 21, 2023
Hey there,
glad to see you're using this setup. Unfortunately, I'm not actively maintaining it anymore (especially the multi-language setup). I have evolved it into my headless Kirby and Nuxt starter for better SEO etc. Feel free to look into that, it also covers all of your i18n needs.
If you require this issue to be resolved for your current project, you can book me for consulting and I will fix it. Drop me a line via email if you are interested. 🙂
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there! I ran into an issue with the router when setting up a multi-language site.
When pointing a link from a non-top-level url to a top-level url it redirects to the error page. This is because it appends the language code twice.
or using a hardcoded path
or using
"../"
So when you're on
www.example.com/en/projects/house
and from there want to link to
www.example.com/en/contact
it redirects to
www.example.com/en/en/contact
and thus goes to the error page.Does it have something to do with the
base
url being built with thelanguageCode
inside the router js file?Thanks for any input!
Edit NOTE:
This only happens when deployed, it doesn't happen on localhost dev. (Maybe a Vite thing?)
The text was updated successfully, but these errors were encountered: