-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
translate-routes and language change #44
Comments
🤔 Strange... |
Sorry. I forget to mention I use next-translate-routes@1.8.0-1 because of this issue: #42. All later versions cause the "no translate routes"-problem. Maybe it's important to say, thatr I use also next-i18next package to translate my content. If I change my changeLanguage like this, the url is correct after reload (but of course I know its not a nice solution :) )
I'll try to set up a sandbox-environment to reproduce the issue. |
Hello again. Have a look at this sandbox-code: Sandbox Language change translated routes. |
! I finally got it. It took me a while but here is the problem: you set the |
Hey there,
I'm using next-translate-routes and it works fine so far. But when I change the language, the paths were not redirected, but the site-content is correct.
My code for languageChange is like this:
my i18 config:
and my _routes.json:
eg.:
I am on page /de/kontakt and use the languageSwitcher. The url changed to /kontakt. The component "contact" is correctly loaded and its translated content too. But the url is false. If I refresh the page in browser, the re-direrection to/contact is done correctly.
How can I change my changeLanguage-Function to make this work?
The text was updated successfully, but these errors were encountered: