Created
December 26, 2014 19:08
-
-
Save jakobdamjensen/d43a986c93fe8aa1b5f3 to your computer and use it in GitHub Desktop.
Global Marionette Templatehelpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Mn = require('backbone.marionette'), | |
Radio = require('backbone.radio'), | |
i18nChannel = Radio.channel('i18n'), | |
_ = require('underscore'); | |
_.extend(Mn.View.prototype, { | |
templateHelpers: { | |
t: function(key){ | |
return i18nChannel.request('translate', key); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment