9
我的应用程序有多个区域设置(it,en)。如何翻译react-router路径路径
我需要翻译所有路线。比如我有条款和条件页面有路径(每个区域一个):
it/termini
en/terms
我需要的不仅仅是做一些事情,如:
// routes.js
const routes = (
<Route path="/" component={App}>
<IndexRoute component={HomePage} />
<Route path="(it/termini)(en/terms)" component={TermsPage} />
<Route path="*" component={NotFoundPage} />
</Route>
)
正如您所看到的,这个时髦的解决方案对于应用程序的可伸缩性不太好。
on'return(
cl0udw4lk3r
是的,他的意思是'Route' – Telokis