public static string HeadingAddOrEdit(this IStringLocalizer me, bool isCreate, string objectName, object?owner) { var text = new StringBuilder(100); text.Append(me.AddOrEdit(objectName, isCreate)); if (owner is not null) { text.Append(' '); text.Append(me["For"].Value.ToLowerInvariant()); text.Append(' '); text.Append(owner.Name()); } return(text.ToString()); }
public static string AddOrEdit(this IStringLocalizer me, string?objectName, bool isAdd) => $"{me.AddOrEdit(isAdd)} {me.ObjectName(objectName, true)}";