Copied to clipboard

Flag this post as spam?

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


  • John Ligtenberg 53 posts 214 karma points
    Feb 07, 2014 @ 12:18
    John Ligtenberg
    0

    Retrieve language of a specific node (different from the root node)


    I've set the language on some specific nodes (i.e. changed from "inherit" to a specific language). These pages are in a language different from the domain language set on the root of the site. The pages in the different languages are not in a different subtree. How can I retrieve the language of these specific nodes?

  • Fuji Kusaka 2203 posts 4220 karma points
    Feb 07, 2014 @ 12:58
    Fuji Kusaka
    0

    You can mek use of this

    @using System.Globalization;
    @{Domain[] domains = umbraco.library.GetCurrentDomains(@Model.Id);
    

    var currentLanguage = CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.ToLower(); @currentLanguage }

  • Fuji Kusaka 2203 posts 4220 karma points
    Feb 07, 2014 @ 12:59
    Fuji Kusaka
    0

    Sorry replying from mobile device

  • John Ligtenberg 53 posts 214 karma points
    Feb 07, 2014 @ 16:42
    John Ligtenberg
    0

    Thanks for your reply, but actually I'm looking for the language as set on the node, as seen in the screenshot. I'm looping through a list of nodes, which are in different languages. This may be different from the culture of the current page or the current domain.

    Selecting a language for a specific node

  • 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