protected virtual XElement CreateHrefLangElement(HrefLangData data)
 {
     return(new XElement(
                SitemapXhtmlNamespace + "link",
                new XAttribute("rel", "alternate"),
                new XAttribute("hreflang", data.HrefLang),
                new XAttribute("href", data.Href)
                ));
 }
        protected virtual HrefLangData CreateHrefLangData(ContentReference contentLink, CultureInfo language, CultureInfo masterLanguage)
        {
            string languageUrl       = UrlResolver.GetUrl(contentLink, language.Name);
            string masterLanguageUrl = UrlResolver.GetUrl(contentLink, masterLanguage.Name);
            var    data = new HrefLangData();

            if (languageUrl.Equals(masterLanguageUrl) && contentLink.CompareToIgnoreWorkID(this.SiteSettings.StartPage))
            {
                data.HrefLang = "x-default";
            }
            else
            {
                data.HrefLang = language.Name.ToLowerInvariant();
            }

            data.Href = GetAbsoluteUrl(languageUrl);
            return(data);
        }
 protected virtual XElement CreateHrefLangElement(HrefLangData data)
 {
     return new XElement(
         SitemapXhtmlNamespace + "link",
         new XAttribute("rel", "alternate"),
         new XAttribute("hreflang", data.HrefLang),
         new XAttribute("href", data.Href)
         );
 }
        protected virtual HrefLangData CreateHrefLangData(ContentReference contentLink, CultureInfo language, CultureInfo masterLanguage)
        {
            string languageUrl = UrlResolver.GetUrl(contentLink, language.Name);
            string masterLanguageUrl = UrlResolver.GetUrl(contentLink, masterLanguage.Name);
            var data = new HrefLangData();

            if (languageUrl.Equals(masterLanguageUrl) && contentLink.CompareToIgnoreWorkID(this.SiteSettings.StartPage))
            {

                data.HrefLang = "x-default";
            }
            else
            {
                data.HrefLang = language.Name.ToLowerInvariant();
            }

            data.Href = GetAbsoluteUrl(languageUrl);
            return data;
        }