HtmlLocalizer Class

Definition

An IHtmlLocalizer that uses the provided IStringLocalizer to do HTML-aware localization of content.

public ref class HtmlLocalizer : Microsoft::AspNetCore::Mvc::Localization::IHtmlLocalizer
public class HtmlLocalizer : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer
type HtmlLocalizer = class
    interface IHtmlLocalizer
Public Class HtmlLocalizer
Implements IHtmlLocalizer
Inheritance
HtmlLocalizer
Implements

Constructors

HtmlLocalizer(IStringLocalizer)

Creates a new HtmlLocalizer.

Properties

Item[String, Object[]]

Gets the string resource with the given name and formatted with the supplied arguments. The arguments will be HTML encoded.

Item[String]

Gets the string resource with the given name.

Methods

GetAllStrings(Boolean)

Gets all string resources.

GetString(String, Object[])

Gets the string resource with the given name and formatted with the supplied arguments.

GetString(String)

Gets the string resource with the given name.

ToHtmlString(LocalizedString, Object[])

Creates a new LocalizedHtmlString for a LocalizedString.

ToHtmlString(LocalizedString)

Creates a new LocalizedHtmlString for a LocalizedString.

WithCulture(CultureInfo)
Obsolete.

Creates a new IHtmlLocalizer for a specific CultureInfo.

Extension Methods

GetAllStrings(IHtmlLocalizer)

Gets all string resources including those for parent cultures.

GetHtml(IHtmlLocalizer, String, Object[])

Gets the LocalizedHtmlString resource for a specific name.

GetHtml(IHtmlLocalizer, String)

Gets the LocalizedHtmlString resource for a specific name.

Applies to