Localization

Localization has moved from Resource based localization to Database based localization, so translation are no more in dll satellite libraries, but in table LocalizationRecords. Look at LocalizationDbContext.

The localization code is in BlazorBoilerplate.Shared.Localizer project. The supported cultures are defined in Settings.cs.

At this time Data Annotations do not support IStringLocalizer<>, so to localize validation error messages, we have to use Blazored.FluentValidation.

Po files

This project adopts the PO file format as standard translations files. In the admin section you can edit translations and import and export PO files. There are a lot of free and paid tools and online services to manage these files. E.g.:

Poedit

Eazy Po

Crowdin (PO file format support)

To manage PO files BlazorBoilerplate uses Karambolo.PO library. So to handle plurals the Karambolo.PO syntax is used like in the example below.

Everywhere you need localized text, inject IStringLocalizer<Global> and look how it is used throughout the code.

L["MsgId usually in english"]

L["Email {0} is not valid", email]

L["One item found", Plural.From("{0} items found", totalItemsCount)]