Skip to content

Instantly share code, notes, and snippets.

Created June 2, 2013 17:39
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
i18n-node in an restify app setup
// require modules
var restify = require('restify'),
i18n = require('i18n'),
// minimal config
locales: ['en', 'de'],
directory: __dirname + '/locales'
// Create the RESTify server
app = restify.createServer();
// enable i18n in restify
// setup a simple resource
app.get('/test', function (req, res, next) {
res.send(200, {
'somevartoreturn': res.__('Hello')
return next();
// Start the app!
app.listen(3000, '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment