Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


I18Next.Net is a port of I18Next for JavaScript. It implements most of the features provided by the original library and enhances this by some more .Net specific features.



Install-Package I18Next.Net

.NET Cli:

dotnet add package I18Next.Net

See Nuget for more information.

If you want to integrate with IServiceCollection also install I18Next.Net.Extensions

Install-Package I18Next.Net.Extensions

For further integration with AspNetCore you are also required to add the I18Next.Net.AspNetCore package.

Install-Package I18Next.Net.AspNetCore

See the usage information below for further help.

Basic Usage

Just for now, a quick description on how to use the library in an AspNetCore MVC application.

First you have to register the required services in your application startup. If you call the IntegrateToAspNetCore method you can use the default configuration for AspNetCore applications which includes an HTML-escaping interpolator and the language detection based on the requests Accept-Language header (internally it is based on the current thread language). I'll explain further below how to make the language detection work.

services.AddI18NextLocalization(i18n => i18n.IntegrateToAspNetCore());

Now you're ready to go using I18Next by simply injecting IStringLocalizer into your controllers and services.

// ...

private readonly IStringLocalizer<HomeController> _localizer;

public HomeController(IStringLocalizer<HomeController> localizer)
    _localizer = localizer;

public IActionResult About()
    ViewData["Message"] = _localizer["about.description"];

    return View();

// ...

If you also want to use view localization in your mvc application you should configure I18Next view localization by adding the following to your MVC builder.


In order to make the language detection work let the app use request localization. Don't forget to specify the supported languages.

app.UseRequestLocalization(options => options.AddSupportedCultures("de", "en"));

You can always take a look at the Example.WebApp in the examples directory until there is a proper documentation about all the provided functionality.

To customize the locale file locations or use other backends just take a look at the i18next builder possibilities provided by the service registration.

services.AddI18NextLocalization(i18n => i18n
    .AddBackend(new JsonFileBackend("wwwroot/locales"))

There are lots of more configuration options. More documentation will follow in the future.


  • Auto build pipeline
  • Further documentation
  • More tests
  • More examples
  • Configurable auto namespace/scope selection for IStringLocalizer<T>


No releases published


No packages published

Contributors 4