Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
language-manager
Advanced tools
The most flexible version of multi-language management. Manages language resources. Makes it easy to switch between different language sources.
The most flexible version of multi-language management. Manages language resources. Makes it easy to switch between different language sources.
$ npm i -g npm
$ npm i --save language-manager
Place the file containing the source language definitions in a folder. For example, "tests/resource".
example.com/ # → Root folder for the project
└── tests/ # → Tests folder
└── resource/ # → Resource Folder .setPath('tests/resource')
└── json/ # → Resource Type Folder .setType(LanguageManager.ResourceType.Json)
├── en-us.json # → Resource language.extention English United States
└── tr-tr.json # → Resource language.extention Turkish Turkey
en-us.json
{
"root": {
"data": [
{
"type": "string",
"name": "app.name",
"value": "Language Manager"
},
{
"type": "string",
"name": "words.ok",
"value": "Okay"
}
]
}
}
tr-tr.json
{
"root": {
"data": [
{
"type": "string",
"name": "app.name",
"value": "Dil Yöneticisi"
},
{
"type": "string",
"name": "words.ok",
"value": "Tamam"
}
]
}
}
/// Language Manager Reference
var LanguageManager = require('language-manager')
/// Test object
var l = new LanguageManager()
// Resource Type format
.setType(LanguageManager.ResourceType.Json)
// Resource file folder
.setPath('tests/resource')
// Resource language code
.setLang('en-us')
/// Expected test result
var expected = 'Language Manager'
/// Actual test result
var actual = l
// Get resource item value string
.Val('app.name')
// Test output
console.log(`${l.Lang} : ${actual}`)
en-us : Language Manager
/// Change language
l.setLang('tr-tr')
/// Expected test result
expected = 'Dil Yöneticisi'
/// Actual test result
actual = l
// Get resource item value string
.Val('app.name')
// Test output
console.log(`${l.Lang} : ${actual}`)
tr-tr : Dil Yöneticisi
$ npm run test
FAQs
The most flexible version of multi-language management. Manages language resources. Makes it easy to switch between different language sources.
The npm package language-manager receives a total of 1 weekly downloads. As such, language-manager popularity was classified as not popular.
We found that language-manager 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.