protected void Page_Init(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request["lang"])) { Session["lang"] = Request["lang"]; } if (Session["lang"] == null) { string strSystemLang = BSHelper.GetSystemLanguage.Split('-').GetValue(0).ToString(); Session["lang"] = strSystemLang != "" ? strSystemLang : "en"; } Language.Setup = BSHelper.GetLanguageDictionary("Setup/Languages/" + Session["lang"].ToString() + ".xml"); if (Blogsa.IsInstalled && !Request.Url.LocalPath.ToLowerInvariant().EndsWith("completed.aspx")) { Response.Redirect("Completed.aspx"); } }
/// <summary> /// Language Admin Method /// </summary> /// <param name="languageCode">Language Code (etc. en, de, tr</param> public static void RefreshBlogAdminLanguage(string languageCode) { Language.Admin = BSHelper.GetLanguageDictionary("Languages/Admin/" + languageCode + ".xml"); }
protected void ddLanguage_SelectedIndexChanged(object sender, EventArgs e) { Session["lang"] = ((DropDownList)sender).SelectedValue; Language.Setup = BSHelper.GetLanguageDictionary("Setup/Languages/" + Session["lang"].ToString() + ".xml"); }