private void SetBrowserLanguage() { string browserLanguage = Request.ServerVariables["http_accept_language"].Split(",".ToCharArray())[0] as string; if (Session["BrowserLanguage"] as string != browserLanguage) { Session["BrowserLanguage"] = browserLanguage; string pageDirection = ""; bool isSupportedLanguage = LocalizationSettings.IsSupportedLanguage(browserLanguage, out pageDirection); if (!isSupportedLanguage) { browserLanguage = "en-US"; } // browserLanguage = "en-US"; //Remove after localization complete Session["selectedCulture"] = browserLanguage; PageHtml.Attributes.Add("dir", pageDirection); CultureInfo cultureInfo = new CultureInfo(Session["selectedCulture"] as string); Thread.CurrentThread.CurrentCulture = cultureInfo; Thread.CurrentThread.CurrentUICulture = cultureInfo; } }