public void RemoveSiteCulture(string cultureName) { Context.Output.WriteLine(T("Removing site culture {0}", cultureName)); if (!_cultureManager.IsValidCulture(cultureName)) { Context.Output.WriteLine(T("Supplied culture name {0} is not valid.", cultureName)); return; } if (_orchardServices.WorkContext.CurrentSite.SiteCulture == cultureName) { Context.Output.WriteLine(T("Cannot remove current culture {0} from site. Change current culture first.", cultureName)); return; } var cultureCheck = _cultureManager.ListCultures().FirstOrDefault(x => x == cultureName); if (string.IsNullOrEmpty(cultureCheck)) { Context.Output.WriteLine(T("Culture {0} is not activated on this site.", cultureName)); return; } _cultureManager.DeleteCulture(cultureName); Context.Output.WriteLine(T("Site culture {0} removed successfully", cultureName)); }
public ActionResult DeleteCulture(string cultureName) { if (!Services.Authorizer.Authorize(StandardPermissions.SiteOwner, T("Not authorized to manage settings"))) { return(new HttpUnauthorizedResult()); } _cultureManager.DeleteCulture(cultureName); return(RedirectToAction("Culture")); }
public ActionResult DeleteCulture(string cultureName) { if (!Services.Authorizer.Authorize(Permissions.ManageSettings, T("无权限"))) { return(new HttpUnauthorizedResult()); } _cultureManager.DeleteCulture(cultureName); return(RedirectToAction("Culture")); }
public void DeleteCulture(string cultureName) { _underlyingCultureManager.DeleteCulture(cultureName); }