-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Internationalized links are broken #137
Comments
Ah yeah, thanks for the report! |
I think this breaks international SEO, as it might work after the client is loaded, but the a-tags contain the wrong Did you find a workaround for this? |
I found no workaround. Full i18n support seems to be broken. I am just hoping that it gets resolved in a foreseeable future (also seems to be a must for a v1.0 release) and my app also has enough other construction zones. |
Absolutely @medihack, for us, i18n is a must, too, as we need to release content in English + German. I think for a good deal of e-commerce etc. this is equally urgent. I assume these Next+Blitz issues are a bit delayed, because of the ongoing refactorings regarding the Next.js fork, and there's too much going on lately, to take a look myself as a Blitz-newbie. |
@medihack @nickluger does it work fine if you use |
@flybayer Ah yes, this seems to fix it. |
Ok that's so weird, because all we are doing is re-exporting that. |
That's strange, but it seems the locale codes are added to the URLs correctly with the next/link component. At least there is a workaround now ;-) |
Can confirm. Works perfectly, both JS-navigation done by |
Thank you, @flybayer! 🙏 |
What is the problem?
When internationalization is enabled links generated with the
Link
component should include the correct current locale. Say in a new blitz project with enabled i18n andde
locale, when visitinghttp://localhost:3000/de
the link to projects on the start page should link tohttp://localhost:3000/de/projects
. But this is not true anymore with current Blitz as it links tohttp://localhost:3000/projects
and a warning is printed on the console:Warning: Prop
hrefdid not match. Server: "/projects" Client: "/de/projects"
(full trace below).I could reproduce the error with at least Blitz versions >= 0.34.x. It worked correctly with Blitz 0.33.0.
Paste all your error logs here:
Paste all relevant code snippets here:
No code snippets needed, see config in steps reproduction.
What are detailed steps to reproduce this?
Or simply clone this repository https://github.com/medihack/blitz_v0.37.0
It also demonstrates the problem with a newly created page and a route manifest.
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response
The text was updated successfully, but these errors were encountered: