Following the example form i18next-express-middleware
router.get('/login', function(req, res, next) {
var lng = req.language;
console.log("");
console.log("Current language:", lng);
console.log("");
res.render("account/login",{layout:"layout-account"});
});
form the terminal I got : Current language: ja-JP , which is cool, but where does the ja-JP comes from (windows or browser's language settings?)
I can use req.i18n.changeLanguage('en'); to change language to see if translation is good or not, but, how can I simulate If I come from another language?
via Kongfupanda
No comments:
Post a Comment