HtmlLocalizer<TResource> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An IHtmlLocalizer implementation that provides localized HTML content for the specified type
TResource
.
generic <typename TResource>
public ref class HtmlLocalizer : Microsoft::AspNetCore::Mvc::Localization::IHtmlLocalizer<TResource>
public class HtmlLocalizer<TResource> : Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<TResource>
type HtmlLocalizer<'Resource> = class
interface IHtmlLocalizer<'Resource>
interface IHtmlLocalizer
type HtmlLocalizer<'Resource> = class
interface IHtmlLocalizer
interface IHtmlLocalizer<'Resource>
Public Class HtmlLocalizer(Of TResource)
Implements IHtmlLocalizer(Of TResource)
Type Parameters
- TResource
The Type to scope the resource names.
- Inheritance
-
HtmlLocalizer<TResource>
- Implements
Constructors
HtmlLocalizer<TResource>(IHtmlLocalizerFactory) |
Creates a new HtmlLocalizer<TResource>. |
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) |
Gets the string resource with the given name. |
GetString(String, Object[]) |
Gets the string resource with the given name and formatted with the supplied arguments. |
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) |
Gets the LocalizedHtmlString resource for a specific name. |
GetHtml(IHtmlLocalizer, String, Object[]) |
Gets the LocalizedHtmlString resource for a specific name. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for