
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
Compile json files using messageformat.js.
npm install --save-dev gulp-i18n
json files with translationsgulpjson files with translationsExample file structure:
.
├── gulpfile.js
├── i18n
│ ├── en
│ │  ├── inicio.json
│ │  └── menu.json
│ └── es
│ ├── inicio.json
│ └── menu.json
├── package.json
└── www
├── i18n
│  ├── en.js
│  └── es.js
└── index.html
Example i18n/en/menu.json file:
{
"ubicaciĂłn": "Location",
"instalaciones": "The House",
"actividades": "Ammenities",
"galerĂa": "Gallery",
"contacto": "Contact"
}
gulpIn your gulpfile.js:
'use strict';
const Gulp = require('gulp');
const I18n = require('gulp-i18n');
Gulp.task('i18n', () => {
Gulp.src('i18n/**/*.json')
.pipe(I18n())
.pipe(Gulp.dest('www/i18n/'));
});
Run task with gulp:
$ gulp i18n
<html>
<body>
<script>
var locale = localStorage.getItem('locale') || 'es';
$('<script>')
.attr('src', '/i18n/' + locale + '.js')
.appendTo('body');
// You can now use the global `i18n` object.
console.log(window.i18n.menu['ubicaciĂłn']());
// This would show "UbicaciĂłn" or "Location" depending on
// selected `locale`.
</script>
</body>
</html>
FAQs
A gulp plugin to compile language files using messageformat
We found that gulp-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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.