SaaS CMS has officially launched! Learn more now.

Translate categories


Is it possible to translate the names or descriptions of categories? I've found a blog post on how to do it in EPi 6 by putting the translations in a language file but I can't get the same thing to work in EPiServer 7. Is there a new better way to work with categories and globalization?

Jul 09, 2013 12:01

Hi Oskar,

Dit you use this format?

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
  <language name="dutch" id="nl">
      <category name="CategoryName">
        <description>CategoryName translated</description>


To do some shameless self promotion: You could also install a NuGet package I created, that allows you to create your translations within the content tree, also for categories.


Hope this helps.

Jul 09, 2013 13:12

Yes, that was the xml I tried earlier and I still can't get it to work.

In view mode I use the code below but it only lists the names of the categories.


And when I edit the page in forms mode the category descriptions are used but they are not translated.

I have translations of page types and properties so I know the language file works.

Jul 09, 2013 14:11

The property for displaying translated categories is LocalizedDescription, so maybe it should be: m.Category.LocalizedDescription ?

Jul 09, 2013 14:32

PagaData.Category don't seem to have LocalizedDescription. And view mode isn't really the problem because there I can translate them myself. I was hoping I would be able to translate them in edit mode as well, but maybe that's not possible?

Jul 09, 2013 15:39

Ah, must have been sleeping. PageData.Category is CategoryList, so it contains the categories, if any are selected. The LocalizedDescription is a property of a category not of the CategoryList (a.k.a. Category)

Jul 09, 2013 15:53

Thank you for all the help, I can get the translated descriptions from the language file by doing something like this:

Model.Category.Select(x=> Category.Find(x).LocalizedDescription)

But the translations are still not shown in edit mode though.


Jul 09, 2013 16:38

No prob. I think to show them in EditMode, you will need to switch the UI language.

Jul 09, 2013 16:44

Both the language file and the UI culture are "en". And property names are translated correctly in edit mode. I'm starting to think that this is a bug in episerver.

Jul 09, 2013 17:17

No, i don't think that is the same bug. My site language is english.

Jul 10, 2013 10:00


I have started working on Localizing the EPiServer Categories, and Category.Find(x).LocalizedDescription works like a charm. Thank you for the suggestion. However while displaying the category description on an Html page , I had to do HttpUtility.HtmlDecode(Category.Find(@tag.Key).LocalizedDescription) as it was displaying & as &amp;

Sep 23, 2015 13:21
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.