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?

tvanfosson
  • 524,688
  • 99
  • 697
  • 795

3 Answers3

2

No sure if this is what are you asking, but in this question I present a solution using asp.net routing (the same used in MVC) for dealing with routes and languages.

Community
  • 1
  • 1
Eduardo Molteni
  • 38,786
  • 23
  • 141
  • 206
1

You don't need to create one site per language.

What I would try to do is use the default controller to catch all requests. Then translate the controller name + action into a base language and then redirect the route appropriately.

ajma
  • 12,106
  • 12
  • 71
  • 90
0

maybe this is also a help on this topic

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

silverfighter
  • 6,762
  • 10
  • 46
  • 73