When I publish the Home
item, the selected language is English
.
But in code, the Root Item
is coming as da (Danish)
.
On publish, for languages, I selected both Danish & English. So, is it taking the first language in that list?
How can I get the language that was selected, when the item was being published, i.e English in this case.
patch.config:
<pipelines>
<publish>
<processor type="MyCode.Handlers.AuditPublish, MyCode"/>
</publish>
</pipelines>
AuditPublish.cs
public class AuditPublish:PublishProcessor
{
public override void Process(PublishContext context)
{
var rootItem = context.PublishOptions.RootItem;
}
}