I18Next.Net.Generators
2.0.0-beta.2
See the version list below for details.
dotnet add package I18Next.Net.Generators --version 2.0.0-beta.2
NuGet\Install-Package I18Next.Net.Generators -Version 2.0.0-beta.2
<PackageReference Include="I18Next.Net.Generators" Version="2.0.0-beta.2"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="I18Next.Net.Generators" Version="2.0.0-beta.2" />
<PackageReference Include="I18Next.Net.Generators"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add I18Next.Net.Generators --version 2.0.0-beta.2
#r "nuget: I18Next.Net.Generators, 2.0.0-beta.2"
#:package I18Next.Net.Generators@2.0.0-beta.2
#addin nuget:?package=I18Next.Net.Generators&version=2.0.0-beta.2&prerelease
#tool nuget:?package=I18Next.Net.Generators&version=2.0.0-beta.2&prerelease
I18Next.Net
I18Next.Net is a port of i18next for .NET. It reads the same translation files as the
JavaScript library and implements its features, so web frontends and .NET backends can share their translations. It
integrates with Microsoft.Extensions.DependencyInjection, IStringLocalizer and ASP.NET Core.
Documentation: darklikally.github.io/I18Next.Net
Packages
| Package | Description |
|---|---|
I18Next.Net |
Translator, interpolation, plurals, formats and the JSON, XML, INI, HTTP, delegate, in-memory and chained backends |
I18Next.Net.Abstractions |
Interfaces for custom backends, translators, interpolators, formatters and loggers |
I18Next.Net.Extensions |
Registration in IServiceCollection and IStringLocalizer support |
I18Next.Net.AspNetCore |
ASP.NET Core integration including request language detection and view localization |
I18Next.Net.Generators |
Source generator for typed keys and translation methods, plus analyzers for the translation files |
I18Next.Net.Yaml |
Backend for YAML translation files |
I18Next.Net.Gettext |
Backend for gettext .mo files |
I18Next.Net.ICU |
Interpolator for ICU message format strings |
I18Next.Net.PolyglotJs |
Interpolator for Polyglot.js style phrases |
I18Next.Net.Serilog |
Logger forwarding the log messages to Serilog |
Quick start
// locales/en/translation.json
{
"welcome": "Hello {{name}}!",
"item_one": "{{count}} item",
"item_other": "{{count}} items",
"price": "Price: {{value, currency(EUR)}}"
}
var backend = new JsonFileBackend("locales");
var translator = new DefaultTranslator(backend, new TraceLogger(),
new DefaultPluralResolver { JsonFormatVersion = JsonFormat.Version4 }, new DefaultInterpolator(new TraceLogger()));
var i18n = new I18NextNet(backend, translator) { Language = "en" };
i18n.T("welcome", new { name = "Jane" }); // Hello Jane!
i18n.T("item", new { count = 5 }); // 5 items
i18n.T("price", new { value = 1234.5 }); // Price: €1,234.50
await i18n.Ta("welcome", new { name = "Jane" });
With dependency injection and ASP.NET Core:
services.AddI18NextLocalization(i18n => i18n
.IntegrateToAspNetCore()
.AddBackend(new JsonFileBackend("wwwroot/locales"))
.UseDefaultLanguage("en")
.UseFallbackLanguage("en"));
Features
- i18next JSON v1 to v4 plurals with the CLDR rules of all languages, ordinals and decimal counts
- Interpolation, nesting, context, default values, fallback languages and namespaces, objects and arrays
number,currency,datetime,relativetimeandlistformats matching the browserIntlAPIs, date-fns and Moment.js formatsgetFixedT,keyPrefix,formatParams,returnObjects,joinArraysand post processors- JSON, YAML, XML, INI, gettext, HTTP, delegate and in-memory backends, chained with caching and expiry
- Typed keys and translation methods generated from the translation files
- .NET Standard 2.0, .NET 6, .NET 8 and .NET 10
See the documentation for all features, the feature parity with i18next and the samples.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 50 | 10/4/2026 |
| 2.0.0-beta.2 | 46 | 10/4/2026 |
| 2.0.0-beta.1 | 44 | 10/4/2026 |