How do you guys do localized routes in N13 with directory bases routing?
Unanswered
Pacific anchoveta posted this in #help-forum
Pacific anchovetaOP
Let's say I want to do
I know about getting the slug part based on the locale. However, I have no clue how do you guys who do international websites in Next 13 that have localized routes e.g. article and articulo with directory based routing?
I haven't found any article or video on youtube about this problem whatsoever. Can N13 with dir. based routing do this thing? If so, how?
Nuxt 3 can do this with the official i18n module without any special things. You just add a piece of code to your page like https://v8.i18n.nuxtjs.org/guide/custom-paths
I am looking for something similar for Next.
/article/trump-lost-2024-presidential-election and also /es/articulo/trump-perdio-elecciones-presidenciales-de-2024?I know about getting the slug part based on the locale. However, I have no clue how do you guys who do international websites in Next 13 that have localized routes e.g. article and articulo with directory based routing?
I haven't found any article or video on youtube about this problem whatsoever. Can N13 with dir. based routing do this thing? If so, how?
Nuxt 3 can do this with the official i18n module without any special things. You just add a piece of code to your page like https://v8.i18n.nuxtjs.org/guide/custom-paths
I am looking for something similar for Next.
18 Replies
Pacific anchovetaOP
Anybody?
Red-crowned Parrot
This is nextJS not Nuxt
🤡🤡🤡🤡🤠🤠ðŸ¤
🤡🤡🤡🤡🤠🤠ðŸ¤
@Red-crowned Parrot This is nextJS not Nuxt
🤡🤡🤡🤡🤠🤠ðŸ¤
I am looking for something similar for Next.they are asking about nextjs
Red-crowned Parrot
Rip
@Pacific anchoveta Let's say I want to do /article/trump-lost-2024-presidential-election and also /es/articulo/trump-perdio-elecciones-presidenciales-de-2024?
I know about getting the slug part based on the locale. However, I have no clue how do you guys who do international websites in Next 13 that have localized routes e.g. article and articulo with directory based routing?
I haven't found any article or video on youtube about this problem whatsoever. Can N13 with dir. based routing do this thing? If so, how?
Nuxt 3 can do this with the official i18n module without any special things. You just add a piece of code to your page like https://v8.i18n.nuxtjs.org/guide/custom-paths
I am looking for something similar for Next.
It’s not natively supported, you have to use a dynamic catch-all route like [[…slug]]/page.tsx and manually implement routing yourself
Pacific anchovetaOP
well, that's just a hack
And the purpose of using app for routing
makes no sense
I think Next is not for my project after all.
It is not natively supported and you have to live with it, either use a hack or don’t use 

Pacific anchovetaOP
I thought that because it's the most popular framework it will support such thing out of the box
I will have to use Nuxt then
It's just weird, because they use the same directory routing
and Nuxt can do it and Next can not.
Well what to do
Nextjs team decided to not do it. Nuxt team decided to do it. That’s how it is
They share similarities but they are independent and a feature in this side doesn’t necessarily get implemented in the other side