Table of Contents

Class TlumachBlazorOptions

Namespace
Tlumach.Blazor
Assembly
Tlumach.Blazor.dll

The options of the Blazor integration of Tlumach, configured in AddTlumachBlazor(IServiceCollection, Action<TlumachBlazorOptions>?).

public sealed class TlumachBlazorOptions : TlumachCultureOptions
Inheritance
TlumachBlazorOptions
Inherited Members

Fields

DefaultLocalStorageKey

The default value of LocalStorageKey.

public const string DefaultLocalStorageKey = "tlumach.culture"

Field Value

string

Properties

ApplyCultureGlobally

Gets or sets a value indicating whether a culture switch (and LoadTlumachCultureAsync(IServiceProvider)) also changes the process-wide culture: DefaultThreadCurrentCulture, DefaultThreadCurrentUICulture, and CurrentCulture of every translation manager.

This is right only when one user owns the process: Blazor WebAssembly and Blazor Hybrid. When null, the value is true in the browser and false elsewhere, so Blazor Hybrid applications set it to true explicitly.

public bool? ApplyCultureGlobally { get; set; }

Property Value

bool?

DefaultManager

Gets or sets the translation manager, from which TlumachText takes texts by key when its Manager parameter is not set.

public TranslationManager? DefaultManager { get; set; }

Property Value

TranslationManager

LocalStorageKey

Gets or sets the key, under which the culture is kept in the local storage of the browser.

public string LocalStorageKey { get; set; }

Property Value

string

Persistence

Gets or sets where the chosen culture is stored. When null, it is LocalStorage in the browser and Cookie elsewhere. A WebAssembly client of a Blazor Web App and a Blazor Hybrid application set it explicitly.

public TlumachCulturePersistence? Persistence { get; set; }

Property Value

TlumachCulturePersistence?