Abl.Mvc.HtmlHelpers.HtmlHelperExtensions.MetaAcceptedLanguage C# (CSharp) Method

MetaAcceptedLanguage() public static method

public static MetaAcceptedLanguage ( this html ) : IHtmlString
html this
return IHtmlString
        public static IHtmlString MetaAcceptedLanguage(this HtmlHelper html)
        {
            var acceptedLanguage =
                HttpUtility.HtmlAttributeEncode(
                    Thread.CurrentThread.CurrentUICulture.ToString());

            var meta = new TagBuilder("meta");
            meta.MergeAttribute("name", "accepted-language");
            meta.MergeAttribute("content", acceptedLanguage);
            return MvcHtmlString.Create(meta.ToString(TagRenderMode.StartTag));
        }