Table of Contents

Class AbstractLocalizationInterceptor

Namespace
MudBlazor
Assembly
MudBlazor.dll

Provides a base implementation for ILocalizationInterceptor.

public abstract class AbstractLocalizationInterceptor : ILocalizationInterceptor
Inheritance
AbstractLocalizationInterceptor
Implements
Derived
Inherited Members
Extension Methods

Constructors

AbstractLocalizationInterceptor(IStringLocalizer, MudLocalizer?)

Initializes a new instance of the AbstractLocalizationInterceptor class.

protected AbstractLocalizationInterceptor(IStringLocalizer localizer, MudLocalizer? mudLocalizer = null)

Parameters

localizer IStringLocalizer

The instance of IStringLocalizer.

mudLocalizer MudLocalizer

The optional custom MudLocalizer.

AbstractLocalizationInterceptor(ILoggerFactory, MudLocalizer?)

Initializes a new instance of the AbstractLocalizationInterceptor class. This creates an ResX reader for builtin LanguageResource with the default LocalizationOptions.

protected AbstractLocalizationInterceptor(ILoggerFactory loggerFactory, MudLocalizer? mudLocalizer = null)

Parameters

loggerFactory ILoggerFactory

The logger factory.

mudLocalizer MudLocalizer

The optional custom MudLocalizer.

Remarks

Properties

Localizer

Gets the IStringLocalizer for internal translations.

protected IStringLocalizer Localizer { get; }

Property Value

IStringLocalizer

MudLocalizer

Gets the custom MudLocalizer for additional translations, if provided.

protected MudLocalizer? MudLocalizer { get; }

Property Value

MudLocalizer

Methods

Handle(string, params object[])

Retrieves the translation corresponding to the provided translation key.

public abstract LocalizedString Handle(string key, params object[] arguments)

Parameters

key string

The name of the string resource.

arguments object[]

The list of arguments to be passed to the string resource.

Returns

LocalizedString

The string resource as a LocalizedString.

Remarks

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