Table of Contents

Class TlumachHtmlLocalizer<TResource>

Namespace
Tlumach.AspNetCore.Mvc
Assembly
Tlumach.AspNetCore.Mvc.dll
public sealed class TlumachHtmlLocalizer<TResource> : IHtmlLocalizer<TResource>, IHtmlLocalizer

Type Parameters

TResource

The 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

factory IHtmlLocalizerFactory

The 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

name string

The 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

name string

The name of the string resource.

arguments object[]

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

includeParentCultures bool

A bool indicating whether to include strings from parent cultures.

Returns

IEnumerable<LocalizedString>

The strings.

GetString(string)

Gets the string resource with the given name.

public LocalizedString GetString(string name)

Parameters

name string

The 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

name string

The name of the string resource.

arguments object[]

The values to format the string with.

Returns

LocalizedString

The formatted string resource as a LocalizedString.