How we can add language name in URL by using Routing?
my site runs on http://localhost:41213/default.aspx
URL successfully but this site in multilingual and my client wants run this site according to language like he wants http://localhost:41213/en/default.aspx
instead of http://localhost:41213/default.aspx
URL.
So my problem is that how to add en,es,hi,etc in URL and how to read this? default.aspx page is on root directory and it is home page.
Use this code in global.asax
make a router handler class like this...
By using this i hope your requirement has fulfill.....
Probably the best way to do this is to have an initial page where he chooses the language he wants. Then the site loads a cookie to his browser indicating his language preference. In subsequent visits, your site reads the cookie and automatically takes him to his language preference.