Class TlumachMudLocalizer
A MudBlazor.MudLocalizer that takes the built-in texts of MudBlazor from Tlumach, in the culture of the user (LocalizerCulture).
When a key is not found, the result has ResourceNotFound set, and MudBlazor shows its built-in English text.
The texts of MudBlazor are .NET composite format strings, such as "{0}-{1} of {2}", so they are formatted with Format(IFormatProvider, string, params object[])
whatever text processing mode the translation set uses.
public class TlumachMudLocalizer : MudLocalizer
- Inheritance
-
MudLocalizerTlumachMudLocalizer
- Inherited Members
Constructors
TlumachMudLocalizer(TranslationManager, string?, TlumachCultureState)
Initializes a new instance of the TlumachMudLocalizer class.
public TlumachMudLocalizer(TranslationManager manager, string? group, TlumachCultureState cultureState)
Parameters
managerTranslationManagerThe translation manager that holds the texts.
groupstringThe group of the translation, in which the keys are stored (see Group), or null.
cultureStateTlumachCultureStateThe culture state of the user.
Properties
Group
Gets the group of the translation, in which the keys are stored, or null when the keys are stored at the root.
public string? Group { get; }
Property Value
this[string]
Gets the text with the given key in the culture of the user.
public override LocalizedString this[string key] { get; }
Parameters
keystringThe key used by MudBlazor, such as
MudDataGrid_Contains.
Property Value
- LocalizedString
The text, or the key with ResourceNotFound set when the key is not found.
this[string, object[]]
Gets the text with the given key in the culture of the user, with the format items replaced by arguments.
public override LocalizedString this[string key, params object[] arguments] { get; }
Parameters
keystringThe key used by MudBlazor, such as
MudDataGridPager_InfoFormat.argumentsobject[]The values of the format items.
Property Value
- LocalizedString
The text, or the key with ResourceNotFound set when the key is not found or the translation is not a valid format string for the arguments.
TranslationManager
Gets the translation manager that holds the texts.
public TranslationManager TranslationManager { get; }