In an effort to consolidate most of my personal repositories into a single platform, this repository won't see any more development here. You can find an unarchived version of the repository over on Codeberg
A ResX Globalization alternative using JSON instead of bulky XML.
Generates strongly-typed resource classes for looking up localized strings.
Install the Intl.Net.ResourceGenerator and Intl.Net.ResourceManager packages in your resource project:
Make sure to copy your JSON resource files to your output directory and mark them as EmbeddedResource
<EmbeddedResource Include="Localization.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>For a list of configurable options, as well as supported i18n providers that fetch your translations from a remote API, please see the wiki pages.
Currently, Intl.Net is just as fast as the Resx ResourceManager shipped with dotnet itself. In cases where trying to get a non-existing key, it is even significantly faster.
For details and the benchmarks run, check the benchmarks folder.
If this library looks amazing, please do check out these similar projects and give them a star!
TypealizR - A source generator doing the same thing for .resx files. It's pretty much a modern Globalization alternative