using System; using System.Threading; using System.Web; using System.Web.Mvc; namespace LeafWeb.Web.Utility { public static class LocalizationHelper { [Obsolete("specifying the language through is obsolete. Use instead")] public static IHtmlString MetaContentLanguage(this HtmlHelper html) { var acceptLang = HttpUtility.HtmlAttributeEncode(Thread.CurrentThread.CurrentUICulture.ToString()); return new HtmlString(string.Format("", acceptLang)); } public static string Lang { get { return HttpUtility.HtmlAttributeEncode(Thread.CurrentThread.CurrentUICulture.ToString()); } } } }