I am using Node.js along with the Express platform and the i18n module . Therefore i use
var i18n = require('i18n'); app.configure(function() { [...] app.use(i18n.init); app.use(app.router); });
in the settings of my application. Everything works fine, but I really need to get i18n to use the langauage that I want. The scenario is as follows: when the user is not logged in, i18n looks for langauage in the accept-language header, and this is normal. But when the user is logged in, I want to navigate the selected langauage somewhere in the user settings, extract it and force the i18n module to use this langauage. How to do this (if I already know how to save / retrieve langauge to / from db)?
source share