protected override void InitializeCulture()
{
try
{
if (Request.Cookies["Language"] == null)
{
language = (Request.Headers["accept-language"].Split(",".ToCharArray())[0]).ToLower();
}
else
{
language = Request.Cookies["Language"].Value.ToLower();
}
UICulture = language;
Culture = language;
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture(language);
System.Threading.Thread.CurrentThread.CurrentUICulture = new
System.Globalization.CultureInfo(language);
}
catch
{
Response.Cookies.Clear();
}
base.InitializeCulture();
}