Skip to content

Instantly share code, notes, and snippets.

Last active May 3, 2021
What would you like to do?
basic plain vanilla setup in node with http
// require modules
var http = require('http'),
i18n = require('i18n'),
// minimal config
locales: ['en', 'de'],
directory: __dirname + '/locales'
// simple server
app = http.createServer(function (req, res) {
// init & guess, see hepler below
i18n.init(req, res);
// startup
app.listen(3000, '');
Copy link

An example of what the /locales folder should contain would help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment