Table of Contents

Class MudLocalizer

Namespace
MudBlazor
Assembly
MudBlazor.dll

This customizable localizer service allows users to supply custom translations for MudBlazor components. Users can register custom implementations using the following syntax, where the scope depends on the implementation: services.Add{scope}Transient<MudLocalizer, CustomMudLocalizerImpl>() or services.TryAdd{scope}Transient<MudLocalizer, CustomMudLocalizerImpl>()

public class MudLocalizer
Inheritance
MudLocalizer
Inherited Members
Extension Methods

Constructors

MudLocalizer()

public MudLocalizer()

Properties

this[string]

Retrieves the translation for the specified translation key.

NB! Override this method to supply custom translations.
public virtual LocalizedString this[string key] { get; }

Parameters

key string

The name of the string resource.

Property Value

LocalizedString

The string resource as a LocalizedString.

Remarks

The value of ResourceNotFound should be true if no translation is available for the specified key.

this[string, object[]]

Retrieves the translation for the specified translation key.

NB! Override this method to supply custom translations.
public virtual LocalizedString this[string key, params object[] arguments] { get; }

Parameters

key string

The name of the string resource.

arguments object[]

The list of arguments to be passed to the string resource

Property Value

LocalizedString

The string resource as a LocalizedString.

Remarks

The value of ResourceNotFound should be true if no translation is available for the specified key.