17 June 2024

How to localize your texts in a Blazor application

In this article I will show you how, in a very simple way, you can have your web application made with Blazor Server in several languages.

.resX or not .resX?

Some may say that using .resx resource files is not the best solution. I’ve even seen one that explains why .resx files don’t work with Blazor components… absolutely not!

Anyway, is there really a good solution?

The best solution for me and the one we love and that works 😋! I’ve been using .resx files for a long time and it’s mainly thanks to a great extension for Visual Studio

ResXResourseManager extension

Thanks to this extension, you can manage your translation files very easily! And believe me! I never look for difficulty! Here is the Github link of this extension but you will find it from the EXTENSION menu of Visual Studio: https://github.com/tom-englert/ResXResourceManager

But the easiest way is to explain it all to you on video:

As you have now seen, it is very easy to have your web application with Blazor in several Languages! Moreover here is a link to the sources as I told you in my video: https://github.com/tossnet/Blazor-Localization/tree/master/LocalizationApp

Leave a Reply