public static string L(string text) { if (text.IsEmpty()) { return(string.Empty); } return(XmlLangResource.GetResource(text)); }
public static HtmlString L(this IHtmlHelper html, string text) { if (text.IsEmpty()) { return(new HtmlString(string.Empty)); } return(new HtmlString(XmlLangResource.GetResource(text))); }
public static HtmlString L(this IHtmlHelper html, string text, params object[] arg) { if (text.IsEmpty() || arg == null) { return(new HtmlString(string.Empty)); } var keyValue = XmlLangResource.GetResource(text); if (arg == null) { return(new HtmlString(keyValue)); } else { return(new HtmlString(string.Format(keyValue, arg))); } }
LocalizedString IStringLocalizer.this[string name, params object[] arguments] => XmlLangResource.GetResourceLocalize(name, arguments);
LocalizedString IStringLocalizer.this[string name] => XmlLangResource.GetResourceLocalize(name);
public IEnumerable <LocalizedString> GetAllStrings(bool includeParentCultures) { return(XmlLangResource.GetAllResources().Select(x => new LocalizedString(x.Name, x.Value))); }