Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6836675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:23:03+00:00 2026-05-26T23:23:03+00:00

I have a Sitecore solution where there are 3 different languages enabled. On top

  • 0

I have a Sitecore solution where there are 3 different languages enabled. On top of the page, there is a link to each language. When you click this link, you get the current page you are standing on, in the selected language.

But not all pages are translated into all languages. So if I am standing on page x in English language, and this page is only available in English and German but not Chinese, then the Chinese link should not be shown.

So the question is – How do I check if the current item has a version of a specific language?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:23:04+00:00Added an answer on May 26, 2026 at 11:23 pm

    To see if there is a version of the current item you can do this: Sitecore.Context.Item.Versions.Count > 0

    [updated for comment]

    I don’t claim that this is the most efficient way to determine if an item has a version in a language, but this will work:

    bool hasVersion = HasLanguageVersion(Sitecore.Context.Item, "en");
    
    private bool HasLanguageVersion(Sitecore.Data.Items.Item item, string languageName)
    {
        var language = item.Languages.FirstOrDefault(l => l.Name == languageName);
        if (language != null)
        {
            var languageSpecificItem = global::Sitecore.Context.Database.GetItem(item.ID, language);
            if (languageSpecificItem != null && languageSpecificItem.Versions.Count > 0)
            {
                return true;
            }
        }
        return false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page in Sitecore that displays the list of clients. There's a
I have a 'General Link' field in one of my pages in Sitecore. This
I have a csv importroutine which imports my CSV values into Sitecore. After this
When setting up or moving a Sitecore solution, you have to remember to setup
I'm busy writing a sitecore solution to manage a news site. I have a
I have created a site with multiple languages in sitecore... I the content editor
In Sitecore I have created a custom field (via this recipe: http://sdn.sitecore.net/Articles/API/Creating%20a%20Composite%20Custom%20Field/Adding%20a%20Custom%20Field%20to%20Sitecore%20Client.aspx ) The
I have a number of different roles in Sitecore. And I have set security
I have a Sitecore/ASP.NET projects that I'm developing. Today at some point I inadvertently
A general architecture question in Sitecore 6... Let’s say we have a situation where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.