csharpfritz / csharp_with_csharpfritz

Show notes, slides, and samples from the CSharp with CSharpFritz show
MIT License
662 stars 215 forks source link

Blazor Server Localization - how to get resx files working in a subfolder #116

Closed trickshot2012 closed 2 years ago

trickshot2012 commented 2 years ago

if you put all resx files of many languages in the pages folder along with your razor page files, the whole thing starts to look a little confusing, i tried putting it in a resx subfolder pic 2 - than its not working anymore.

1 grafik

2 grafik

trickshot2012 commented 2 years ago

i finally figured out 👍

in Program.cs add the options.ResourcesPath builder.Services.AddLocalization(options => options.ResourcesPath="Resources");

the folder structure than: grafik