Locale prefix handling for i18n #6086
aymericzip
started this conversation in
Ideas
Replies: 1 comment
-
|
Note: the Then in the browser console I got
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm building Intlayer, i18n solution
Do current intlayer doc, shows how to integrates path locale prefix
/(en),/fr/(fr)See PR #6039 on your repo
And I have to say that I'm not a big fan of that
/$-{locale}/It's quite impactful in terms for DX, it apply to adapt all
useNavigateandLink, and also make the 404 management tricky to implement.Same, I had issue to set the
<html lang={locale} />without using a custom hook to change the attribute dynamicallyIt would be nice to be able to manage the url prefix at the router declaration level, and provide a locale param at the
__root.tsxlevelHere an example of how intlayer can be plugged on a nuxt app
https://github.com/aymericzip/intlayer/blob/main/packages/nuxt-intlayer/src/module.ts#L86
Offering a similar way to prefix would be nice
Beta Was this translation helpful? Give feedback.
All reactions