/// <summary> /// Removes culture from site. Called when the "Remove culture from site" button is pressed. /// Expects the AddCultureToSite method to be run first. /// </summary> private bool RemoveCultureFromSite() { // Get the culture CultureInfo removeCulture = CultureInfoProvider.GetCultureInfo("MyNewCulture"); if (removeCulture != null) { // Get the binding CultureSiteInfo cultureSite = CultureSiteInfoProvider.GetCultureSiteInfo(removeCulture.CultureID, SiteContext.CurrentSiteID); if (cultureSite != null) { // Delete the binding CultureSiteInfoProvider.DeleteCultureSiteInfo(cultureSite); return(true); } } return(false); }