I18Next.Net.Extensions 2.0.0-beta.2

This is a prerelease version of I18Next.Net.Extensions.
There is a newer version of this package available.
See the version list below for details.
dotnet add package I18Next.Net.Extensions --version 2.0.0-beta.2
                    
NuGet\Install-Package I18Next.Net.Extensions -Version 2.0.0-beta.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="I18Next.Net.Extensions" Version="2.0.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="I18Next.Net.Extensions" Version="2.0.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="I18Next.Net.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add I18Next.Net.Extensions --version 2.0.0-beta.2
                    
#r "nuget: I18Next.Net.Extensions, 2.0.0-beta.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package I18Next.Net.Extensions@2.0.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=I18Next.Net.Extensions&version=2.0.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=I18Next.Net.Extensions&version=2.0.0-beta.2&prerelease
                    
Install as a Cake Tool

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, relativetime and list formats matching the browser Intl APIs, date-fns and Moment.js formats
  • getFixedT, keyPrefix, formatParams, returnObjects, joinArrays and 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.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (7)

Showing the top 5 NuGet packages that depend on I18Next.Net.Extensions:

Package Downloads
I18Next.Net.AspNetCore

ASP.NET Core integration for I18Next.Net with request language detection and view localization.

GenerativeObjects.Data.DataObjects

GO Meta Modeler Data Objects

GenerativeObjects.Portal.Data.DataObjects

GO Meta Portal Data Objects

GenerativeObjects.Generator.Data.DataObjects

GO Meta Generator Data Objects

GenerativeObjects.Data.DataProvidersExtensions.Custom

GO Meta Modeler Data Provider Extensions Custom

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 42 10/4/2026
2.0.0-beta.2 37 10/4/2026
2.0.0-beta.1 35 10/4/2026
1.0.0 1,001,544 4/23/2022
0.7.1 272,919 12/17/2019
0.7.0 9,669 7/25/2019
0.6.1 17,719 10/10/2018
0.6.0 1,327 9/26/2018
0.5.1 1,444 9/12/2018
0.5.0 1,160 9/11/2018