Table of Contents

Class TlumachBlazorServiceCollectionExtensions

Namespace
Tlumach.Blazor
Assembly
Tlumach.Blazor.dll

Registers the Blazor integration of Tlumach.

public static class TlumachBlazorServiceCollectionExtensions
Inheritance
TlumachBlazorServiceCollectionExtensions
Inherited Members

Methods

AddTlumachBlazor(IServiceCollection, Action<TlumachBlazorOptions>?)

Registers the per-user culture state, the cascading TlumachCulture value, and the culture store. The options are also registered as TlumachCultureOptions, which UseTlumachRequestLocalization and MapTlumachCultureEndpoint of Tlumach.AspNetCore use. It also makes the injected IStringLocalizer and IStringLocalizer<T> follow the culture of the user.

In a Blazor Web App, call this method both in the server and in the client project. A repeated call in the same project only applies configure to the options of the first call.

public static IServiceCollection AddTlumachBlazor(this IServiceCollection services, Action<TlumachBlazorOptions>? configure = null)

Parameters

services IServiceCollection

The services to add to.

configure Action<TlumachBlazorOptions>

A callback that configures the options.

Returns

IServiceCollection

The value of services.