Can be handled with ContentService in ApplicationEventHandler inheritor class, using Saving event, like the following:
using Umbraco.Core;
using Umbraco.Core.Events;
using Umbraco.Core.Models;
using Umbraco.Core.Services;
namespace CustomerHomePage.Core.EventHandlers
{
public class ApplicationHandler : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
ContentService.Saving += ContentServiceOnSaving;
}
private void ContentServiceOnSaving(IContentService sender, SaveEventArgs<IContent> saveEventArgs)
{
// Here should be any logic during saving of changes in any nodes
}
}
}
Get the ancestor of the sender and find your list of Translation, then just check all children elements value IsDefault. If you want to cancel saving and display some message do the following:
if (e.CanCancel)
{
e.Cancel = true;
e.CancelOperation(new EventMessage("Category name", "You message here", EventMessageType.Error));
}