I'm currently working on a multilingual Next.js 13 application, and I'm using the next-intl package for internationalization. I've been trying to set up translated URLs for my routes, but I'm running into some issues.
Here's an example of what I want to achieve. If the source language is Danish, a route could be:mypage/om.
For English, it would be: mypage/en/about.
My project is structured to utilize the App directory (/app/[lang]/page.tsx).
I've followed the next-intl documentation to set up internationalized routing, but I'm having difficulty getting the URL translation to work correctly with this setup.
I need the pages to be able to take advantage of "generateStaticParams" so we can build static pages with all the diffrent languages and allow each url to be language specific but still only have to create 1 single page for the main language. I hope this makes sense.
When I navigate to mypage/om, the application correctly resolves to the Danish version, i can also see the english version on mypage/en/om. However, I want to be able to navigate to mypage/en/about, without having to make multiple pages with diffrent names.
Does anyone have experience setting up translated URLs with next-intl in Next.js 13, particularly with an App directory structure? Any help would be greatly appreciated. Thanks in advance!