0

有没有办法在使用时翻译参数getStaticPaths

您应该使用翻译生成所有路径,还是有办法在使用时只翻译参数router.push({ pathname, query }, asPath, { locale: nextLocale })

例如,如果我在 getStaticPaths 作为 paths: { params: { color: 'white', size: "big" }},这会导致/dogs/white/big,当切换DE到 have/dogs/weiss/gross而不添加路径数组{ params: { color: "weiss", size: "gross" }, locale: "DE" }

4

0 回答 0