private string GetMarkup(Sitecore.Data.Items.Item item, Sitecore.Globalization.Language lang) { if (lang != item.Language) { Sitecore.Links.UrlOptions opts = Sitecore.Links.LinkManager.GetDefaultUrlOptions(); opts.Language = lang; return(String.Format( @"<a href=""{0}""><img border=""0"" src=""{1}"" alt=""{2}"" /></a>", Sitecore.Links.LinkManager.GetItemUrl(item, opts), Sitecore.Resources.Images.GetThemedImageSource(lang.GetIcon(item.Database)), lang.GetDisplayName())); } else { return(String.Format( @"<img src=""{0}"" alt=""{1}"" />", Sitecore.Resources.Images.GetThemedImageSource(lang.GetIcon(item.Database)), lang.GetDisplayName())); } }
public static List <object[]> GetLanguagePropertiesFull(Sitecore.Globalization.Language l) { var results = new List <object[]>() { new object[] { "Language Property", "Value" }, new object[] { "Name", l.Name }, new object[] { "DisplayName", l.GetDisplayName() }, new object[] { "CultureInfo", GetCulturePropertiesFull(l.CultureInfo) }, new object[] { "Origin Item Id", (l.Origin != null && l.Origin.ItemId != (Sitecore.Data.ID)null) ? l.Origin.ItemId.Guid.ToString() : string.Empty }, }; return(results); }