HtmlLocalizer<TResource> Class¶
An Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer
implementation that provides localized HTML content for the specified type
<em>TResource</em>.
- Namespace
Microsoft.AspNetCore.Mvc.Localization
- Assemblies
- Microsoft.AspNetCore.Mvc.Localization
Syntax¶
public class HtmlLocalizer<TResource> : IHtmlLocalizer<TResource>, IHtmlLocalizer
-
class
Microsoft.AspNetCore.Mvc.Localization.
HtmlLocalizer<TResource>
¶
Constructors¶
-
HtmlLocalizer
(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory)¶ Creates a new
Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer`1
.Arguments: factory (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory) – The Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizerFactory
.public HtmlLocalizer(IHtmlLocalizerFactory factory)
-
Methods¶
-
GetAllStrings
(System.Boolean)¶ Return type: System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString> public virtual IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures)
-
GetString
(System.String)¶ Return type: Microsoft.Extensions.Localization.LocalizedString public virtual LocalizedString GetString(string name)
-
GetString
(System.String, System.Object[]) Return type: Microsoft.Extensions.Localization.LocalizedString public virtual LocalizedString GetString(string name, params object[] arguments)
-
WithCulture
(System.Globalization.CultureInfo)¶ Return type: Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer public virtual IHtmlLocalizer WithCulture(CultureInfo culture)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer<TResource>.
Item[System.String]
¶ Return type: Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString public virtual LocalizedHtmlString this[string name] { get; }
-
Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizer<TResource>.Item[System.String, System.Object[]]
Return type: Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString public virtual LocalizedHtmlString this[string name, params object[] arguments] { get; }
-