Table of Contents

Interface ITlumachCultureStore

Namespace
Tlumach.Blazor
Assembly
Tlumach.Blazor.dll

Stores the culture that the user has chosen so that the next visit or the next circuit starts with it.

Register an own implementation before calling AddTlumachBlazor(IServiceCollection, Action<TlumachBlazorOptions>?) to replace the built-in stores.

public interface ITlumachCultureStore

Methods

LoadAsync(CancellationToken)

Loads the name of the stored culture.

ValueTask<string?> LoadAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to cancel the operation.

Returns

ValueTask<string>

The culture name, or null if nothing is stored.

SaveAsync(CultureInfo, CancellationToken)

Stores the culture.

ValueTask SaveAsync(CultureInfo culture, CancellationToken cancellationToken = default)

Parameters

culture CultureInfo

The culture to store.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

ValueTask

A task that completes when the culture is stored.