Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All;
I subscribe to the ContentService.Publishing in a Component and trying to get culture from current node to make validations based on language
I try with node.AvailableCultures , but something is missing
Is there a way to get the culture?
private void ContentService_Publishing(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.ContentPublishingEventArgs e) { foreach (var node in e.PublishedEntities) {
Thanks in advance
Hi,
I think you can just use the IsPublishingCulture extension to check the culture? I am not too sure since I have never used it myself.
private void ContentService_Publishing(Umbraco.Core.Services.IContentService sender, Umbraco.Core.Events.ContentPublishingEventArgs e) { foreach (var node in e.PublishedEntities) { if(e.IsPublishingCulture(node, "en-GB"){}
Let me know how it goes!
-Joep
Hi Joep,
Thanks a lot, I try IsPublishingCulture extension and It worked like a charm!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get culture from current node
Hi All;
I subscribe to the ContentService.Publishing in a Component and trying to get culture from current node to make validations based on language
I try with node.AvailableCultures , but something is missing
Is there a way to get the culture?
Thanks in advance
Hi,
I think you can just use the IsPublishingCulture extension to check the culture? I am not too sure since I have never used it myself.
Let me know how it goes!
-Joep
Hi Joep,
Thanks a lot, I try IsPublishingCulture extension and It worked like a charm!
is working on a reply...