November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
I didn't think media and assets were Globalizable, can you demonstrate how you made your file translatable
I have a custom doc type for my pdf files with ILocalizable interface implemented
[ContentType(
DisplayName = "PDF File", GUID = "C2C5C8F2-AB98-43D6-BDCA-679B3E712EFE",
Description = "PDF file")]
[MediaDescriptor(ExtensionString = "pdf")]
public class DocumentFile : MediaData, ILocalizable
{
/* implementation */
}
so pdf files are handled with this type and has Language property
Theirs some additional logic you will need to add alongside implementing ILocalizable
Please see here : Localizable media assets - Grzegorz Wiecheć (gregwiechec.com)
Hopefully the same concepts work for CMS12
for any other viewer: custom localizable document type must also redirect master languange content data to other languange invariants of the content
the code from the article:
public override Blob BinaryData
{
get
{
if (ContentReference.IsNullOrEmpty(this.ContentLink))
{
return base.BinaryData;
}
if (this.Language.Name == this.MasterLanguage.Name)
{
return base.BinaryData;
}
var contentRepository = ServiceLocator.Current.GetInstance();
var content = contentRepository.Get(this.ContentLink.ToReferenceWithoutVersion(), new LanguageSelector(this.MasterLanguage.Name));
return content.BinaryData;
}
set
{
base.BinaryData = value;
}
}
the same approach works for Thumbnail property
I uploaded a file to the site with English as a master languange. Then I created languange branches for the file.
When I have Englsih(master) language branch active, I can download the file. But when I have any other language branch active I can't download or preview the file by link.
Any ideas why that is happening?