Options for Web app globalization/localization tools?

353 views Asked by At

I am looking for some tools/frameworks for .NET Core 3.1 to ease the localization of my web app. I wanna avoid dealing with .resx files as much as possible. Westwind.Globalization is a good one but it does not support version .NET Core 3.1. Is there anything similar to that or any other solutions?

Searched the internet a lot. Could not find any.

1

There are 1 answers

1
Jaska On

If you use ASP.NET Core it has this new IStringLocalizer/IViewLocalizer concept. You no longer have to create .resx file but you just inject the localizer interface and then use the interface to translate you markup and code.

<p>This is a sample</p>

becomes

<p>@localizer["This is a sample"]</p>

You can use the localizer in source code too.

To localize you still have to create the localized .resx file that is a plain. Fortunately there are tools that can do if for you.

When using Soluling, you just select .csproj file. Then Soluling scans your code (.cshtml and .cs files) to find intances where localizer has been used. Soluling extract the strings and shows you (or your translator) a user interface to translate them. Finally it creates the localized .resx files. You compile your project and it is multilingual.

Read more from here.