Example #1
0
 public static Item GetLanguageVersionIfExist(Item item, Sitecore.Globalization.Language language)
 {
     if (language != null)
     {
         var languageSpecificItem = item.Database.GetItem(item.ID, language);
         if (languageSpecificItem != null && languageSpecificItem.Versions.Count > 0)
         {
             return(languageSpecificItem);
         }
     }
     return(null);
 }
Example #2
0
 public static bool HasLanguage(Item item, Sitecore.Globalization.Language language)
 {
     return(ItemManager.GetVersions(item, language).Count > 0);
 }