Localization with separate Language folders within Views

Localization with separate Language folders within Views

I'm trying to have specific folders for each language in Views. (I know this isn't the best way of doing it but it has to be this way for now)
e.g. /Views/EN/User/Edit.aspx /Views/US/User/Edit.aspx

These would both use the same controller and model but have different Views for each language.

In my Global.asax.cs I have:

routes.MapRoute(     "Default", // Route name     "{language}/{controller}/{action}/{id}", // URL with parameters     new { language = "en", controller = "Logon", action = "Index", id = UrlParameter.Optional }, // Parameter defaults     new { language = @"en|us" } // validation ); 

This works ok but always points to the same View.
If I put the path to the Lanagugage folder it works:

return View("~/Views/EN/User/Edit.aspx"); 

But clearly this isn't a very nice way to do it.
Is there anyway to get MVC to look in the correct language folder?

I know this isn't the best way of doing Localization but I can't use resource files.

“ASP.NET Webforms MVP” as an alternative to “ASP.NET MVC” [closed]


Asp.net Mvc Routing problem
Change the ViewEngine to use a routeparameter. How to dynamically determine which HTML 'wrapper' file to use based on the Action Method being executed? http://stackoverflow.com/questions/639450/change-lookup-rule-for-views. Can an Action Filter have access to a private object in the Controller? EDIT. Is it possible to optimize ASP.NET WebForms to perform as fast as ASP.NET MVC? Since the list of paths scanned for the view is static there is no chance to choose different views depending on any controller instance by working changing the list according to the link above. Return all fields from strongly typed object from View in MVCThis looks a more promissing starting point:. ASP.NET MVC - Routing still confusing for me http://www.dotnetguy.co.uk/post/2010/01/31/ASPNET-MVC-e28093-Dynamically-Changing-The-Master-Page-%28Theming%29.aspx. Changing a page from DropDownList using jQuery It overwrites CreateView to chnage the view rendered. The sample changes the Masterpage, although hopefully it also works for views..

73 out of 100 based on 38 user ratings 833 reviews