I have a .net we开发者_Go百科bsite in Italian and English. The Italian is in the root, while the English is in a folder (/en). I would like to automatically redirect my non Italian users to the English version of my website.
how can I do that? Moreover, is it possible to give the chance to override the redirect (i.e. if someone is Italian but has an English browser, can he go back to the Italian version of the website?)
thanks
for me the best way is to show in all pages a button to give the possibility to everyone to swith from a language to another. To check the preferred language set in the browser of the user u can use this: HttpRequest.UserLanguages http://msdn.microsoft.com/en-us/library/system.web.httprequest.userlanguages.aspx
next time u can use the 'localization' ability of the .net ;)
精彩评论