4

While playing around with localization using Matt Hawley's approach. I wonder if someone has figured to localize routes. I can do this using global resources per site. But when I would try to make it a users choice (so users can switch between languages) the architecture does not allow it because the routes are mapped at application startup and not at session level. Do I have to provision a site per language? What am I missing?

4

3 回答 3

2

不确定这是否是您要问的,但在这个问题中,我提出了一个使用 asp.net 路由(与 MVC 中使用的相同)来处理路由和语言的解决方案。

于 2009-04-15T23:32:08.090 回答
1

您无需为每种语言创建一个站点。

我会尝试做的是使用默认控制器来捕获所有请求。然后将控制器名称 + 操作翻译成基本语言,然后适当地重定向路由。

于 2009-01-30T06:48:35.670 回答
0

也许这也是对这个话题的帮助

http://haacked.com/archive/0001/01/01/internationalized-urls.aspx

于 2009-04-27T19:58:44.400 回答