Replies: 1 comment
-
Your even listener is definitely on the right track, and I have a feeling it's working on some of your links and not others. Anything that already rendered on the page won't be updated, but new calls to For stuff like this, particularly with locales since all your links will change, I would suggest forcing a full page reload on the one request where the locale is changed. The alternative would be a combination of what you're doing now and also refactoring to ensure that every place you're using |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm using Laravel & Inertia for my project.
All my routes have prefix
/{route}/
.I have
SetLocale.php
middleware that does someting like:And I have a Inertia Link that changes the locale.
The link changes, but my
route()
links stay in the previous locale.Ok, I understand that I'm using
@routes
blade directive and the links are sent only once, but I tried something like:But no luck.
I know that I can use
<a href=""
instead of<Link href=""
but I don't think its ideal because I want to preserve my form states.Any ideas ?
Beta Was this translation helpful? Give feedback.
All reactions