HtmlLocalizerExtensions Class

Extension methods for Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.

Namespace
Microsoft.AspNetCore.Mvc.Localization
Assemblies
  • Microsoft.AspNetCore.Mvc.Localization

Syntax

public class HtmlLocalizerExtensions
class Microsoft.AspNetCore.Mvc.Localization.HtmlLocalizerExtensions

Methods

GetAllStrings(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer)

Gets all string resources including those for parent cultures.

Arguments:htmlLocalizer (Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer) – The Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.
Return type:System.Collections.Generic.IEnumerable<Microsoft.Extensions.Localization.LocalizedString>
Returns:The string resources.
public static IEnumerable<LocalizedString> GetAllStrings(this IHtmlLocalizer htmlLocalizer)
GetHtml(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer, System.String)

Gets the Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString resource for a specific name.

Arguments:
Return type:

Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString

Returns:

The Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString resource.

public static LocalizedHtmlString GetHtml(this IHtmlLocalizer htmlLocalizer, string name)
GetHtml(Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer, System.String, System.Object[])

Gets the Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString resource for a specific name.

Arguments:
Return type:

Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString

Returns:

The Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString resource.

public static LocalizedHtmlString GetHtml(this IHtmlLocalizer htmlLocalizer, string name, params object[] arguments)