Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
N

nestjs-i18n

> 后端框架
Open source

The i18n module for nestjs.

719 stars0 likes1 views
WebsiteGitHub

About

The i18n module for nestjs.

The i18n library for nestjs. It makes working with languages in your nestjs project easy. Everything is made to be highly configurable. You can write and plug-in your own language resolvers or loaders.

Features

nestjs-i18n comes with a bunch of tools to help add multiple language support to your project.

  • Type safety (instructions)
  • Variable formatting (instructions)
  • Fallback languages (instructions)
  • Live reloading
  • Plurals support (instructions)
  • GraphQL support (instructions)
  • gRPC support (instructions)
  • DTO validation (instructions)
  • View engine support (hbs or pug or ejs)
  • Custom resolvers
  • Custom loaders
  • Custom formatters

Getting started

To get started follow the quickstart, or take a look at the docs.

License

nestjs-i18n is MIT licensed.

Breaking changes:

  • from V10.0.0 on we removed the I18nRequestScopeService. This because we now have async_hooks support. This allows you to get the current I18nContext by doing I18nContext.current().

  • from V9.0.0 on we renamed the parser property to loader. The translate function no longer returns a promise . A lot of new features and new docs, see nestjs-i18n.com.

  • from V8.0.0 on we changed the internal I18n-middleware for an interceptor this way we can provide the ExecutionContext so that nestjs-i18n works on different protocols as well, such as gRPC and WebSockets. This contains one breaking change. It only applies to your code if you've made a custom resolver. To resolve this breaking change take a look at this example. Instead of providing the req in the resolve method, change this to take the ExecutionContext as argument.

  • from V6.0.0 on we implemented the I18nParser, by using this we can easily support different formats other than JSON. To migrate to this change look at the quickstart. There are some changes in the declaration of the I18nModule. Note: the translate function returns a Promise. So you need to call it using await i18n.translate('HELLO');

  • from V4.0.0 on we changed the signature of the translate function, the language is now optional, if no language is given it'll fallback to the fallbackLanguage.

  • from V3.0.0 on we load translations based on their directory name instead of file name. Change your translations files to the structure found in the quickstart.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScripti18nnestjsnodejstypescript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category后端框架
PricingOpen source

> Related tools

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架