Copied to clipboard

Flag this post as spam?

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


  • itaRubin 13 posts 113 karma points
    Apr 17, 2019 @ 06:40
    itaRubin
    0

    Translation value in dictionary list

    Translation value in dictionary list

    after i sort the dictionary list can i add the Translation value to the view?

    <div class="umb-table-cell" ng-repeat="column in item.translations">
       <i class="{{column.hasTranslation ? 'icon-check color-green' : 'icon-alert color-red'}}"></i>                            
    </div>
    

    can i display the Translation value instead of the green V

    dictionary view

  • Jonathan Distenfeld 105 posts 618 karma points
    Apr 18, 2019 @ 11:58
    Jonathan Distenfeld
    0

    Hi,

    not sure what those translations are but you would display the items your iterating like this:

    <div class="umb-table-cell" ng-repeat="column in item.translations">
       <i class="{{column.hasTranslation ? 'icon-check color-green' : ''}}">
          {{column.hasTranslation ? column.value : ''}}
       </i>
    </div>
    

    note that column.value is only a placeholder. The property you want to display might have a different name.

    -Jonathan

  • itaRubin 13 posts 113 karma points
    Apr 21, 2019 @ 04:58
    itaRubin
    0

    that column have only 2 properties (hasTranslation, displayName). i need to add column.value to display that value

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Apr 18, 2019 @ 12:44
    Dave Woestenborghs
    1

    Making changes in this view will be overwritten when you upgrade Umbraco. Keep that in mind.

    Dave

  • itaRubin 13 posts 113 karma points
    Apr 21, 2019 @ 05:00
    itaRubin
    0

    yes i know. for now i'm using umbraco 7. thank you.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Apr 23, 2019 @ 07:39
    Dave Woestenborghs
    0

    Hi

    Doesn't matter if you use V7. Even if you do a patch upgrade it will override this file.

    dave

  • itaRubin 13 posts 113 karma points
    Apr 23, 2019 @ 07:42
    itaRubin
    0

    thank you.

  • itaRubin 13 posts 113 karma points
    Feb 11, 2020 @ 13:11
    itaRubin
    100

    I found a solution for this. I changed Umbraco source code in 3 places.

    1. Umbraco.Web.Models.ContentEditing -> DictionaryOverviewTranslationDisplay, add DataMember named "translationValue".

    2. DictionaryModelMapper.cs, add TranslationValue = translation != null ? translation.Value : string.Empty after "HasTranslation..."

    3. list.html, we can use the new property and print the translationValue to dictionary list. "column.translationValue"

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft