Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steffen Dam 5 posts 25 karma points
    Jun 22, 2016 @ 08:50
    Steffen Dam
    0

    Tree root node name based on language XML files

    Hi there :)

    I've created a new section in the backoffice for my site which contains several trees.

    When defining the trees, I have to assign a name. This is cool, and all, but I would like for this name to change based on the chosen language in the backoffice.

    [Umbraco.Web.Trees.Tree("SiteOptions", "Notifications" , "Notifications" /* this is shown as the name in the tree */, "icon-bell", "icon-bell")]
    public class NotificationsTreeController : TreeController
    {
        protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
        {
            ...
        }
    
        protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
        {
            ...
        }
    }
    

    I would like the displayed name to change to say "Notifikationer" when Danish is picked as a language. I already got it working for the section name, but I can't figre out how to get it to work for the root nodes.

    Anyone got any ideas?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies