You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I want to create a helper to make translations. In my application, messages key are dotted. For example generic.message.success. So I made the translation helper
{{translation generic.message.success}}
But generic.message.success is not in the passed JSON. It's a general string. How can I tell the helper to not try to get this string as a JSON member?
Handlebars.registerHelper('translation', function(key) {
var translation = translate(key);
return new Handlebars.SafeString( translation );
});
Thanks!
The text was updated successfully, but these errors were encountered:
Hi!
I want to create a helper to make translations. In my application, messages key are dotted. For example generic.message.success. So I made the translation helper
But generic.message.success is not in the passed JSON. It's a general string. How can I tell the helper to not try to get this string as a JSON member?
Thanks!
The text was updated successfully, but these errors were encountered: