Table of Contents

Interface ILocalizationInterceptor

Namespace
MudBlazor
Assembly
MudBlazor.dll

This customizable localization interceptor enables users to tailor existing localizations, incorporating features such as logging missing translations or completely redefining the localization selection process. Users can register custom implementations using the syntax:

AddLocalizationInterceptor<TInterceptor>(IServiceCollection, Func<IServiceProvider, TInterceptor>)

AddLocalizationInterceptor<TInterceptor>(IServiceCollection).
public interface ILocalizationInterceptor
Extension Methods

Methods

Handle(string, params object[])

Retrieves the translation corresponding to the provided translation key.

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.