Class TlumachHtmlLocalizer<TResource>
- Namespace
- Tlumach.AspNetCore.Mvc
- Assembly
- Tlumach.AspNetCore.Mvc.dll
An IHtmlLocalizer<TResource> backed by Tlumach; see TlumachHtmlLocalizer.
public sealed class TlumachHtmlLocalizer<TResource> : IHtmlLocalizer<TResource>, IHtmlLocalizer
Type Parameters
TResourceThe type, whose full name is the context of the options, or a class created by Tlumach Generator.
- Inheritance
-
TlumachHtmlLocalizer<TResource>
- Implements
-
IHtmlLocalizer<TResource>
- Inherited Members
Constructors
TlumachHtmlLocalizer(IHtmlLocalizerFactory)
Initializes a new instance of the TlumachHtmlLocalizer<TResource> class.
public TlumachHtmlLocalizer(IHtmlLocalizerFactory factory)
Parameters
factoryIHtmlLocalizerFactoryThe factory that creates the localizer for
TResource.
Properties
this[string]
Gets the string resource with the given name.
public LocalizedHtmlString this[string name] { get; }
Parameters
namestringThe name of the string resource.
Property Value
- LocalizedHtmlString
The string resource as a LocalizedHtmlString.
this[string, object[]]
Gets the string resource with the given name and formatted with the supplied arguments. The arguments will be HTML encoded.
public LocalizedHtmlString this[string name, params object[] arguments] { get; }
Parameters
namestringThe name of the string resource.
argumentsobject[]The values to format the string with.
Property Value
- LocalizedHtmlString
The formatted string resource as a LocalizedHtmlString.
Methods
GetAllStrings(bool)
Gets all string resources.
public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures)
Parameters
Returns
- IEnumerable<LocalizedString>
The strings.
GetString(string)
Gets the string resource with the given name.
public LocalizedString GetString(string name)
Parameters
namestringThe name of the string resource.
Returns
- LocalizedString
The string resource as a LocalizedString.
GetString(string, params object[])
Gets the string resource with the given name and formatted with the supplied arguments.
public LocalizedString GetString(string name, params object[] arguments)
Parameters
namestringThe name of the string resource.
argumentsobject[]The values to format the string with.
Returns
- LocalizedString
The formatted string resource as a LocalizedString.