Table of Contents

Interface ITwLocalizer

Namespace
TwBlazor.Localization
Assembly
TwBlazor.dll

Supplies the text and the date and time formats TwBlazor components render with.

public interface ITwLocalizer
Extension Methods

Remarks

TwLocalizer is registered by AddTwBlazor and reads .resx files. Register your own implementation to take the strings from somewhere else.

Properties

Direction

Gets the direction the current language is read in. Components use it to mirror their keyboard navigation, so that the arrow keys keep following what is on screen.

TextDirection Direction { get; }

Property Value

TextDirection

Formats

Gets the date and time formats for the current culture.

TwDateTimeFormats Formats { get; }

Property Value

TwDateTimeFormats

this[string]

Gets the text for a key in the current language.

string this[string key] { get; }

Parameters

key string

One of the TwStrings keys.

Property Value

string

The text, or key when nothing is registered for it.

this[string, object?[]]

Gets the text for a key in the current language, with its {0} placeholders filled in.

string this[string key, params object?[] arguments] { get; }

Parameters

key string

One of the TwStrings keys.

arguments object[]

The values for the placeholders.

Property Value

string

The formatted text.