I'm trying to implement localization in my Blazor WebAssembly app, by following one of tutorials found on internet, such as: Localization in Blazor
I have set up everything described in tutorials, but I cannot get a localized value for a specific key, I get a KEY displayed as text I want to localize.
Here is my code: Program.cs - hardcoded culture, to make sure i choose the right one:
builder.Services.AddLocalization(opts => { opts.ResourcesPath = "Localization"; });
var culture = new CultureInfo("sr");
CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;
In my .razor file I injected a IStringLocalizer:
@inject IStringLocalizer<General> localizer
And I use a localizer like this: <MudTooltip Text="@localizer["Open"]">
My Class generated from .resx is called General.
Here is my resources setup: Added a resx as Embedded resource and code gen tool PublicResXFileCodeGenerator

My localized resx for Serbian language is set as EmbeddedResource and with no code generation tool.
