You can navigate between pages by knowing the current culture of the browser
and also keep the user choice to redirect him to the target languages regardless the current culture of the browser
this can simply done by the code below
if (!string.IsNullOrEmpty(Request.QueryString["Lang"]))
{
HttpCookie myCookie = (HttpCookie)Request.Cookies["cLang"];
if (myCookie != null)
{
if (myCookie["Lang"] != Request.QueryString["Lang"].ToString())
{
myCookie["Lang"] = Request.QueryString["Lang"].ToString();
myCookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(myCookie);
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Request.QueryString["Lang"]);
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(Request.QueryString["Lang"]);
Response.Redirect(Request.Url.AbsoluteUri);
}
}
else
{
string strLang = Request.QueryString["Lang"];
myCookie = new HttpCookie("cLang");
myCookie.Values.Add("Lang", strLang);
myCookie.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(myCookie);
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(strLang);
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(strLang);
}
}
But what if you want to add another language to your site ?!
will you copy the same pages and translate it to the other language ?!
Not the best choice, so i strongly recommend reading the following article (http://afana.me/post/aspnet-mvc-internationalization.aspx)