Hello,
I'm using Express + Hogan + Lingua for my application. Static translations works well, but dynamic output always results in an empty translation.
Can you help me, please ?
Here is my template test.hjs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{lingua.application.title}}</title>
</head>
<body>
<div>{{lingua.application.title}}</div>
<div>{{lingua.application.name(app)}}</div>
</body>
</html>
And the nodejs module test.js
exports.dialog = function () {
var show = function (req, res) {
res.render('test', {
app: {
version: '0.0.1'
}
});
}
return {
show: show
};
};
My en.json file
{
"application": {
"title": "My i18n test app",
"name": "Test version {version}"
}
}
The rendered result :
My i18n test app
Thanks
Hello,
I'm using Express + Hogan + Lingua for my application. Static translations works well, but dynamic output always results in an empty translation.
Can you help me, please ?
Here is my template test.hjs
And the nodejs module test.js
My en.json file
The rendered result :
My i18n test app
Thanks