【发布时间】:2020-07-14 19:40:51
【问题描述】:
有没有办法在 NextJS 中执行以下操作?
/route1
/translatedRoute1
/route2
/translatedRoute2
有这个文件夹结构
pages/
[route1]/
index.js
[route2]/
index.js
这将产生错误,因为 [route1] 和 [route2] 在所有情况下都将匹配。 我的想法是我想为英语和罗马尼亚语呈现相同的组件。
/about-us
/despre-noi
-> I want this to render the same component as "/about-us"
This can be achieved with
/en/about-us
/ro/about-us
But this is not the desired effect.
想要的效果是改变不同语言的slug
【问题讨论】:
标签: next.js