This forum is for questions about contributing to the project or proposing features that you would like to develop for the project.
Hi Joe,
this changes to setup new site pages using site UI Culture if user set site culture on web.config
this is my changes to the mojoSetup.cs to allow setup initial pages with it's UI Culture
i have send the file to your mail
and this is lines i have change it
////// to setup new site pages using site UI Culture if user set it on web.config CultureInfo siteCultureInfo = null; if (WebConfigSettings.UseCultureOverride) { string siteCultureKey = "site" + siteSettings.SiteId.ToInvariantString() + "uiculture"; if (ConfigurationManager.AppSettings[siteCultureKey] != null) { try { string cultureName = ConfigurationManager.AppSettings[siteCultureKey]; // change these neutral cultures which cannot be used to reasonable specific cultures if (cultureName == "zh-CHS") { cultureName = "zh-CN"; } if (cultureName == "zh-CHT") { cultureName = "zh-HK"; } CultureInfo siteCulture = new CultureInfo(cultureName); siteCultureInfo = siteCulture; } catch { } } } ////// to setup new site pages using site UI Culture if user set it on web.config if (contentPage.ResourceFile.Length > 0) { //// pageSettings.PageName = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Name); pageSettings.PageName = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Name, siteCultureInfo,false); if (contentPage.Title.Length > 0) { //// pageSettings.PageTitle = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Title); pageSettings.PageTitle = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Title, siteCultureInfo, false); } } else { pageSettings.PageName = contentPage.Name; pageSettings.PageTitle = contentPage.Title; }
////// to setup new site pages using site UI Culture if user set it on web.config
CultureInfo siteCultureInfo = null; if (WebConfigSettings.UseCultureOverride) { string siteCultureKey = "site" + siteSettings.SiteId.ToInvariantString() + "uiculture"; if (ConfigurationManager.AppSettings[siteCultureKey] != null) { try { string cultureName = ConfigurationManager.AppSettings[siteCultureKey];
// change these neutral cultures which cannot be used to reasonable specific cultures if (cultureName == "zh-CHS") { cultureName = "zh-CN"; } if (cultureName == "zh-CHT") { cultureName = "zh-HK"; }
CultureInfo siteCulture = new CultureInfo(cultureName); siteCultureInfo = siteCulture; } catch { } } } ////// to setup new site pages using site UI Culture if user set it on web.config
if (contentPage.ResourceFile.Length > 0) { //// pageSettings.PageName = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Name);
pageSettings.PageName = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Name, siteCultureInfo,false);
if (contentPage.Title.Length > 0) { //// pageSettings.PageTitle = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Title); pageSettings.PageTitle = ResourceHelper.GetResourceString(contentPage.ResourceFile, contentPage.Title, siteCultureInfo, false); } } else { pageSettings.PageName = contentPage.Name; pageSettings.PageTitle = contentPage.Title; }
Hi Ahmed,
This change is now in the repository with some refactoring to eliminate code duplication.
Best,
Joe