Skip to content

Instantly share code, notes, and snippets.

View mpodriezov's full-sized avatar
:octocat:

Max Podriezov mpodriezov

:octocat:
  • Microsoft
  • Prague
View GitHub Profile
@mpodriezov
mpodriezov / express_i18n_nunjucks.js
Created August 9, 2019 11:12
Internationalization and localization example using express + i18n and nunjucks
// usual requirements
const express = require('express');
const cookieParser = require('cookie-parser');
const i18n = require('i18n');
const nunjucks = require('nunjucks');
const app = module.exports = express();
i18n.configure({
// setup some locales - other locales default to en silently
locales: ['en', 'fr', 'de', 'ru'],