
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@ecomplus/i18n
Advanced tools
:brazil: :us:
Tree shakable dictionary focused on eCommerce JS applications.
i18n~i19~ Internationalization
npm i --save @ecomplus/i18n
import { i19hello, i19visitor } from '@ecomplus/i18n'
console.log(`${i19hello.en_us} ${i19visitor.pt_br}`)
// Hello Visitor
console.log(`${i19hello.pt_br} ${i19visitor.pt_br}`)
// Olá Visitante
We recommend using it with ecomUtils.i18n:
import { i18n } from '@ecomplus/utils'
import { i19hello, i19visitor } from '@ecomplus/i18n'
console.log(`${i18n(i19hello)} ${i18n(i19visitor)}`)
// Hello Visitor
Change current language with ecomUtils._config:
import { _config, i18n } from '@ecomplus/utils'
import { i19hello, i19visitor } from '@ecomplus/i18n'
_config.set('lang', 'pt_br')
console.log(`${i18n(i19hello)} ${i18n(i19visitor)}`)
// Olá Visitante
It'll output large size bundle, not good for frontend apps.
import dictionary from '@ecomplus/i18n'
console.log(`${dictionary.i19hello.en_us} ${dictionary.i19visitor.en_us}`)
// Hello Visitor
You can import only one language variation using Webpack resolve.alias as following:
// webpack.config.js
module.exports = {
//...
resolve: {
alias: {
'@ecomplus/i18n$': `@ecomplus/i18n/src/${lang}/`
}
}
}
By this way you'll import only strings instead of objects:
import { i19hello, i19visitor } from '@ecomplus/i18n'
console.log(`${i19hello} ${i19visitor}`)
// Hello Visitor
You can still use ecomUtils.i18n the same way:
import { i18n } from '@ecomplus/utils'
import { i19hello, i19visitor } from '@ecomplus/i18n'
console.log(`${i18n(i19hello)} ${i18n(i19visitor)}`)
// Hello Visitor
'Hello');const) names always in English;i19 for all variable names;i19helloWorld);i19OrderStatus);Msg;Qn;FAQs
Tree shakable dictionary for e-commerce JS apps
The npm package @ecomplus/i18n receives a total of 344 weekly downloads. As such, @ecomplus/i18n popularity was classified as not popular.
We found that @ecomplus/i18n demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.