Closed cristodcgomez closed 9 years ago
Nevermind, I fixed this using this in handlebarsHelpers.js:
module.exports = function(Handlebars) {
return {
copyright: function(year) {
return new Handlebars.SafeString("©" + year);
},
t: function (key) {
return this.app.polyglot.t(key);
}
};
};
In __layout.hbs I use {{t "home"}} and it works.
Hi! I've been tried to start a small app using Rendr and translate the menu options and some word with polyglot. I read the doc but when I try to use the .t() function I can't use it.
This is my __layout.hbs:
but the server responses:
Am I wrong with the call? How can I load the values for the layout?