I'm very new to Node.js
and Express.js
development and I'm looking for a simple and easy solution for creating multi language routes using i18n
module.
I would like to achieve that urls in my app look like this:
www.myapp.com/en/about
www.myapp.com/de/about
www.myapp.com/fr/about
Than I would like to get the language as a string from url and sand it to the view as a variable. Like so:
app.get("/:lang/about",function(req,res){
res.render("about",{language: lang});
});
The default language would be English - en.
Please help.