London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Customizing allowedtype message above contentarea in CMS

Vote:
 

Hi,

Currently i'm trying to change the generated message for allowed types on a list in the CMS. The allowed types only allow certain media types like .doc and .pdf to be added to the list. This is the code that i use:

[Required]
[Display(
             Name = "Foo",
             Description = "Bar",
             GroupName = SystemTabNames.Content,
             Order = 2)]
[AllowedTypes(new[] { typeof(AdobePdfFile), typeof(MsWordFile), typeof(MsExcelFile), typeof(ZipFile) })]
public virtual IList ContentReferencesCollection { get; set; }

The filetype classes shown in the code all inherit from EPiServer.Core.Mediadata.

When i go to the CMS the text above the contentarea shows the following message:

You can add these content types

Media, Media, Media, Media

Question: How can i change the words media to something like Word document or pdf?

I looked at this post, but did not get it working so i'm wondering if there are alternatives.

Thanks in advance!

#196598
Sep 05, 2018 13:22
Vote:
 

Hi Jordi,

Did you ensure you specified a localization provider and path (as per here)?

If so -- an XML structure like this should work:

<?xml version="1.0" encoding="utf-8"?>
<languages>
  <language name="English" id="en">
    <contenttypes>
      <adobepdffile>
        <name>PDF</name>
      </adobepdffile>
    </contenttypes>
  </language>
</languages>

/Jake

#197476
Oct 03, 2018 19:02
* 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.