November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Oskar,
Dit you use this format?
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<languages>
<language name="dutch" id="nl">
<categories>
<category name="CategoryName">
<description>CategoryName translated</description>
</category>
</categories>
</language>
</languages>
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.
http://nuget.episerver.com/en/OtherPages/Package/?packageId=EPiServer.Libraries.Localization
http://jstemerdink.wordpress.com/2013/06/20/a-custom-localization-provider-for-episerver-7-2/
Hope this helps.
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.
@Html.PropertyFor(m=>m.Category)
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.
The property for displaying translated categories is LocalizedDescription, so maybe it should be: m.Category.LocalizedDescription ?
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?
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)
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.
No prob. I think to show them in EditMode, you will need to switch the UI language.
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.
Could it be this bug?
http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=71724&epslanguage=en
Hi,
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 &
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?