Copied to clipboard

Flag this post as spam?

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


  • Danni 13 posts 52 karma points
    Aug 17, 2015 @ 13:48
    Danni
    0

    Render in grid is not rendering Umbraco dictionary items

    It seems that "Render in grid" is not rendering Umbraco dictionary items.

    If I go like this:

    <a href="@linkNode.Url" class="btn btn-cta btn-small">@Umbraco.GetDictionaryValue("News.SeeAllNews")</a>
    

    It won't render in the grid, but it does so, on the frontend.

  • Sean Håkansson 67 posts 193 karma points
    Feb 17, 2016 @ 15:10
    Sean HÃ¥kansson
    0

    No answer? I'm having same issue right now for a contact form, I rather not have the editor type label field each time? I'm guessing the backoffice language is not the same thing as the frontend language?

  • Jordan Lane 28 posts 130 karma points c-trib
    Apr 21, 2016 @ 02:18
    Jordan Lane
    0

    Just came across this problem as well, it's actually the same issue you get using WebAPI where it loses the current culture and therefore the dictionary doesn't know which language to return.

    It should probably be added to the core files, but for now adding this should work as long as the your top level node has a culture set:

    LeBlender/editors/leblendereditor/views/Base.cshtml

    if (!Lecoati.LeBlender.Extension.Helper.IsFrontEnd())
    {
        var cultureAlias = umbraco.cms.businesslogic.web.Domain.GetDomainsById(Helper.GetCurrentContent().AncestorOrSelf(1).Id)[0].Language.CultureAlias;
        Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(cultureAlias);
        Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(cultureAlias);
    }
    
Please Sign in or register to post replies

Write your reply to:

Draft