A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi,
You can check it using the below code
var contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var blockTypeList = contentTypeRepository.List().OfType<PageType>().ToList();
List<PageType> newlist = new List<PageType>();
if (blockTypeList != null && blockTypeList.Any())
{
foreach (var block in blockTypeList)
{
if (block.IsAvailable && string.IsNullOrEmpty(block.Description))
{
newlist.Add(block);
foreach (var prop in block.PropertyDefinitions)
{
var isLanguageSpecific = prop.LanguageSpecific;
}
}
}
}
Hi,
I think Ravindra's answer would work if you want to check against a content type for language specific properties but, if you're trying to check whether a specific property on a given contentitem is localisable (for example checking within a controller for a given page), you can look at the Property collection on that content item like this:
currentPage.Property["MyPropertyName"].IsLanguageSpecific
In Episerver exists shared properties between all languages and can only be edited in the master language.
![]()
How to detect if property is shared in C#?