System.Globalization.I18N.___q C# (CSharp) Method

___q() public static method

Quotes the text as the xgettext cannot correctly extract values from attributes

Translates the given html applying '"'+HttpUtility.HtmlAttributeEncode(string.Format(html, htmlArguments))+'"' to the current culture language.

Warning! Neither the html nor the htmlArguments will be encoded whatsoever

Usage: <div title=@___q("< class='tip'>There are {0} {1} in cart.</div>", 3, "<b>Items</b>")>... -- Note the missing quotes!

public static ___q ( this culture, string html ) : System.Web.Mvc.MvcHtmlString
culture this The culture being extended
html string The html text to be translated
return System.Web.Mvc.MvcHtmlString
        public static MvcHtmlString ___q(this CultureInfo culture, string html, params object[] htmlArguments)
        {
            var result = new MvcHtmlString('"' + HttpUtility.HtmlAttributeEncode(string.Format(I18NComplete.GetText(html, lcid: culture.LCID), htmlArguments.Select(a => HttpUtility.HtmlEncode(a)).ToArray())) + '"');
            return
            #if DEBUG
             I18NComplete.OnGetting___q(result, culture, html, htmlArguments) ??
            #endif
             result;
        }