Highlighting of Untranslated Items in Sitecore

Sitecore-Items-Highlighting-Translation-image

In one of my previous blog posts, I shared my impression of what I liked in Umbraco CMS and which of its killer features would be great to have in Sitecore. I’ve since decided to implement one of these capabilities — the highlighting of untranslated items in Sitecore’s Content Tree. Read on to learn how I got it done.

Read also:Umbraco vs. Sitecore: as Seen by a Sitecore Developer

Why Do We Need the Highlighting of Untranslated Items?

The highlighting of translated items is a very useful feature when translating content, as it highlights text that hasn’t been altered yet.

Highlighting-in-Sitecore-1-photo

How Did I Do This?

I decided to use the Gutter in the Sitecore Content Editor (which you can activate by right-clicking on the gutter area to the left of the Content Tree).

Highlighting-in-Sitecore-2-photo

Then, choose the language.

Highlighting-in-Sitecore-3-photo

After that, a custom icon in the gutter will indicate items that haven’t been translated yet (in other words, that don’t have language versions). By the way, you can choose the Gutter icon you like best. After the language has been changed, icons will update automatically across items in the Content Tree.

For example, when switching to German, we can see that the About page hasn’t been translated, while Contacts is in German.

Highlighting-in-Sitecore-4-photo

Does Sitecore Really Have Nothing of the Kind?

Actually, Sitecore has a similar functionality by default — the Missing Versions Gutter, but it’s not that I needed.

How does it work in Sitecore? When enabled, a round red icon is displayed in front of each item that has missing versions, for all languages at once. To see the list of languages, you need to hover over the icon.

In my case, the icon is displayed only for the context language. So, when I change the language, I can see untranslated items only in the language I need.

Highlighting-in-Sitecore-5-photo

To Sum Up My Experience

The technical implementation isn’t complex. It includes a class that checks whether there is a version available in another language and a Gutter item in the Core database.

The source code is available on GitHub.

Rating: 5.0/5. From 1 vote. Show votes.
Please wait...

About the author

Raman Khalupau
Raman Khalupau

Raman Khalupau is a talented, certified Sitecore Lead developer who helps transform routine projects into extraordinary pieces of IT art. Aimed at non-stop self-improvement, Raman also manages the internal Sitecore community and helps less experienced developers become true experts. Find him on LinkedIn.

2 Comments

Leave a comment
  • I also find it very useful in Umbraco – no headaches about what you have already translated and what – haven’t. It’s great that you’ve come up with this feature, although that of Sitecore is also good enough, especially for those who translated into many languages at once.

  • Raman, thank you so much, an incredibly convenient feature! I think it’s way more handy than that of Sitecore, as one doesn’t need to get through ‘unnecessary’ languages.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>