1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Is there a way to localize categories?

Is there a way to localize categories?

3 posts, 1 answered
  1. Stéphane Lagacé
    Stéphane Lagacé avatar
    2 posts
    Registered:
    21 Sep 2012
    26 Mar 2010
    Link to this post
    Hi,

    I would like to be able to give a french and english name for news categories.  Is there a way to set that up in the web.config file?

    Thanks
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Mar 2010
    Link to this post
    Hi Stéphane Lagacé,

    The categories are metakeys that are created per provider. They are not localizable. There are two options

    1. Create an additional provider that will be used only with french categories.

    2. This is a more complex option.

    • You need to create an additional metakey - say FrenchCategories.
    • When you are creating a content items you have to get the CurrentUICulture and depending on that you will show the default CategoriesList DropDown or your custom one - that will have categories with french titles.
    • You need to override CategoriesTreeView for the backend and there again check for the CurrentUICulture and depending on this bind your categories.
    3. If you want to use the public CategoriesTree control, you also have to override its BindCategories method where you need to set the RadTreeView node Text property to the name of ICategory object( which should be in French or English)

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
  3. Stéphane Lagacé
    Stéphane Lagacé avatar
    2 posts
    Registered:
    21 Sep 2012
    26 Mar 2010
    Link to this post
    Hi Ivan,

    We're still evaluating the product so I wont try It right now.  It's good to know there is that kind of flexibility in the product.

    Thanks for the quick answer.
Register for webinar
3 posts, 1 answered