Welcome to the community forum, and thanks for reaching out to us.
You need to create the folder structure and files like this:
pages/
[lang]/
[news]/
- index.jsx // will match for /is/frett and /en/news, handle these paths rendering here
- [uid].jsx // will match for /is/frett/[uid] and /en/news/[uid]
Give this a try, and let me know if you have any further questions.
You are right, but if you can introduce one more level somewhere in the path like that:
page
n-type //just an example for differentiating, you can use any other name which can segregate news and article
[news]
- index.jsx // is/frett and en/news
-[uid].jsx // is/frett/[uid] and en/news/[uid]
a-type //just an example for differentiating, you can use any other name which can segregate articles
[article]
-index.jsx // is/grein and en/article
-[uid].jsx // is/grein/[uid] and en/article/[uid]
I gave an example of using strings like "n-type" and "a-type." You can use some meaningful names for folders. Here, in the path tree structure, you need to have some folder or page name through which you can differentiate the path between articles and news. Here, you need to have the hard-folder names.
That way you are mentioning that all the URLs which are starting from"/frett/:slug" to "/news/:slug", but that is not the objective.
,Still be on the same side:
page
n-type //just an example for differenti. You can use any other name which can segregate news and article
/pages
/news_type
/[news]
- index.jsx // is/frett and en/news
-[uid].jsx // is/frett/[uid] and en/news/[uid]
/article_type //just an example for differentiating, you can use any other name which can segregate articles
/[article]
-index.jsx // is/grein and en/article
-[uid].jsx // is/grein/[uid] and en/article/[uid]