i18n solid primitive with SolidStart
I'm in a snake biting its own tail situation. Using @solid-primitives/i18n, I'd like to use the
/[lang]/...
param to indicate I18nProvider
which language to pick.
But I hit the error:
But useParams()
returns undefined. Most probably not working outside <Routes>
...4 Replies
try something along these lines
Providers are just passing children through so you should be able to put it in between Routes and FileRoutes
But it might not work as well...
Is there a way to do layouts in solid-start?
code that is under the router but shared on every route...
I've created
[lang].tsx
in the root of the routes folder
It is indeed a layout
Seems to work well 🙂
Again, writing questions get you answers! 😉ok cool
that's good
because I have no idea how to solve it in the root file 😅
even if the api could change
yeah I suppose useParams() make sense under <FileRoutes/>
Thx for the brainstorm 😉
I need to figure out how to change the lang of <Html/> but that will be ok for now 😄