Skip to content

Getting started ​

Packages ​

PackageDescription
I18Next.NetCore library with translator, interpolation, plurals, formats and the JSON, XML, INI, HTTP, in-memory, delegate and chained backends
I18Next.Net.AbstractionsInterfaces for writing your own backends, translators, interpolators, formatters and loggers
I18Next.Net.ExtensionsRegistration in IServiceCollection and IStringLocalizer support
I18Next.Net.AspNetCoreASP.NET Core integration including view localization
I18Next.Net.ICUInterpolator for ICU message format strings
I18Next.Net.PolyglotJsInterpolator for Polyglot.js style translations
I18Next.Net.GettextBackend for gettext .mo files
I18Next.Net.YamlBackend and reader for YAML translation files
I18Next.Net.SerilogLogger forwarding I18Next.Net log messages to Serilog
I18Next.Net.GeneratorsSource generator for typed keys and translation methods, plus analyzers for the translation files

The packages target .NET Standard 2.0 (including .NET Framework 4.6.2 and later), .NET 6, .NET 8 and .NET 10. A .NET 11 build is added automatically when building with a .NET 11 SDK.

Installation ​

dotnet add package I18Next.Net
dotnet add package I18Next.Net.Extensions
dotnet add package I18Next.Net.AspNetCore

Quick start ​

json
// locales/en/translation.json
{
    "welcome": "Hello {{name}}!",
    "inbox": {
        "title": "Inbox"
    }
}
csharp
var backend = new JsonFileBackend("locales");
var translator = new DefaultTranslator(backend);
var i18n = new I18NextNet(backend, translator) { Language = "en" };

i18n.T("welcome", new { name = "Jane" });   // Hello Jane!
i18n.T("inbox.title");                      // Inbox
await i18n.Ta("welcome", new { name = "Jane" });

Released under the Apache License 2.0.