Copied to clipboard

Flag this post as spam?

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


  • David Armitage 414 posts 1655 karma points
    Jul 20, 2018 @ 05:37
    David Armitage
    0

    Umbraco - Get current language culture in razor script

    Hi Peeps,

    I was just wondering if anyone knows how to find a pages current culture from a razor view?

  • David Armitage 414 posts 1655 karma points
    Jul 20, 2018 @ 05:47
    David Armitage
    104

    Hi,

    I figured this out. This is what we should be looking for.

    <p>
          @System.Threading.Thread.CurrentThread.CurrentCulture.DisplayName
    </p>
    

    I documented a blog post for this here.

    https://www.umbrajobs.com/blog/posts/2018/july/umbraco-get-current-language-culture-in-razor-script/

    Hope this helps someone else out.

    Kind Regards

    David

  • 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