
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
nestjs-i18n
Advanced tools
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.
nestjs-i18n comes with a bunch of tools to help add multiple language support to your project.
To get started follow the quickstart, or take a look at the docs.
nestjs-i18n
is MIT licensed.
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<string>
. 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.
i18next is a popular internationalization framework for JavaScript applications. It provides a wide range of features for managing translations and supports various backends for loading translation files. Compared to nestjs-i18n, i18next is more general-purpose and can be used with any JavaScript framework, not just NestJS.
nestjs-i18n is another internationalization module for NestJS. It offers similar functionalities to nestjs-i18n, such as managing translations and supporting multiple languages. However, it may have different configuration options and features.
react-i18next is a powerful internationalization library specifically designed for React applications. It builds on top of i18next and provides React-specific bindings. While it offers similar translation management features, it is tailored for use with React rather than NestJS.
FAQs
The i18n module for Nest.
The npm package nestjs-i18n receives a total of 181,340 weekly downloads. As such, nestjs-i18n popularity was classified as popular.
We found that nestjs-i18n demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.