
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
rtranslation
Advanced tools
Very simple translation module for Node.js
npm install --save rtranslation
To set up rTranslation you have to use this:
GLOBAL.lang = require("rtranslation")(options);
Options object:
var options = {
//default language, not required but recommended
language: "en_EN"
//string to return if passed key is wrong, by defoult key will be returned
wrong: "undefined"
}
lang.loadTranslationFromFile(file, callback);
lang.loadTranslationFromFileSync(file);
lang.loadTranslation(language, object, callback);
lang.loadTranslation(key, language);
lang.t(key, language);
Using async module for loading multiple files
var async = require('async');
GLOBAL.lang = require("rtranslation")({
language: "pl_PL",
wrong: "undefined"
});
async.map(['pl.json','en.json'], lang.loadTranslationFromFile, function(err){
if(err) throw err;
console.log(lang.translation);
console.log(lang.t("test"));
console.log(lang.t("test", "en_EN"));
console.log(lang.t("a.b.c.d"));
console.log(lang.t("a.b.c.d", "en_EN"));
console.log(lang.t("a.b.text"));
console.log(lang.t("a.b.text", "en_EN"));
//wrong keys
console.log("Wrong keys:");
console.log(lang.t("z"));
console.log(lang.t("a.somethink"));
console.log(lang.t("a.b.text.d"));
console.log(lang.t("a.b.c.d.e"));
console.log(lang.t("a.b"));
});
FAQs
Very simple translation module.
We found that rtranslation 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.