
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

A Localization Middleware For NodeJS
#Installing
npm install locals --save
#LOCALS Locals currently only supports translations but in the future will support many more features. (see TODO).
#USING To use locals within your application or module you can use the following javascript example:
var locals = require('locals')({
localsdir: "../locals",
baselanguage: "en"
});
locals.init(function() {
locals.local('es');
var translatedText = locals.translate("Hello World");
console.log("Translation:", translatedText);
});
#Introduction Locals utilizes a Folder and Json based hierarchy for loading and translating locale data. Locale data can then be used to translate text from a given language to any other given language. Locals uses the 2 digit ISO standard for language designation. All locals are created manually by the author as only a basic local demonstration set has been added to this release.
#Locals Structure Locals uses folders to load locale data. The follow folder structure is used in creation of a base language to translate from:
./locals/en
./locals/de
./locals/fr
Where each language folder is a 2 digit ISO representation of the main language to translate from.
Each locale folder may contain any other 2 digit ISO representation of a secondary language to translate to represented as a json file:
./locals/en/de.json
./locals/en/en.json
./locals/en/es.json
Where each json file represents the locale to translate to from the parent folders locale.
For direct reference see the examples folder within the package or on github.
#TODO
#CONTRIBUTING
We encourage forking. Feel free to fork & pull your new additions, or bug fixes.
##LICENSE MIT
FAQs
A Locals Middleware
We found that locals 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.