localizify can work together with express.
First of all add middleware to switch locale on request:
const localizify = require('localizify');
app.configure(() => {
// ...
app.use((request, response, next) => {
const lang = localizify.detectLocale(request.headers['accept-language']) || "en";
localize.setLocale(lang);
next();
});
// ...
});
And export translate function as static helpers:
app.helpers({
// ...
t: localizify.translate,
});