I\'m currently using Handlebars.js (associated with Backbone and jQuery) to make a web app almost totally client side rendered, and I\'m having issues with the internationalisat
With NodeJs / Express :
node-i18n ( detect the Accept-Language header )
app.use(i18n.init);
Sample translation file
{
"hello": "hello",
"home-page": {
"home": "Home",
"signup": "Sign Up"
}
}
In Express controller
...
data.tr = req.__('home-page');
var template = Handlebars.compile(source);
var result = template(data);
Handlebars Template
- {{tr.home}}