Explanation
MudBlazor itself provides English language strings for texts found in e.g. the MudDataGrid filter options.
By registering a custom MudLocalizer implementation as a Service, you can provide custom translations.
Crowdsourced Translations
You can help us translate MudBlazor into your language by contributing to our
Weblate Project.
Visit the Translations Repository for more information.
The crowdsourced translations are provided via the separate NuGet package MudBlazor.Translations.
Open a terminal and install it with this command.
dotnet add package MudBlazor.Translations
Add the following in Program.cs to register the crowdsourced translations.
using MudBlazor.Translations; builder.Services.AddMudTranslations();
Custom Localizer Registration
Add the following in Program.cs to register your custom localization service.
AddTransient can be replaced with TryAddTransient and the scope can be changed to Scoped or Singleton depending on your exact implementation.
using Microsoft.Extensions.DependencyInjection; using MudBlazor; builder.Services.AddTransient<MudLocalizer, CustomMudLocalizerImpl>();