Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Handlebars' I18n translation helper
Handlebars.registerHelper('t', function(i18n_key) {
i18n_key = Handlebars.Utils.escapeExpression(i18n_key);
var result = I18n.t(i18n_key);
return new Handlebars.SafeString(result);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.