Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Get current language from BlockData in PublishingContent


I'm doing some operations on PublishingContent event and need the language of the current Content of the event.

`if (e.Content is StandardPage standardPage)` This gives me access to standardPage.Language (CultureInfo)

`if (e.Content is TextBlock textBlock)` This however does not. Both inherits from IContent in the end.

How can I get CultureInfo from textBlock?

Edited, Aug 18, 2022 10:10

Casting block to ILocalizable makes Language propery available.

Aug 18, 2022 10:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.