Skip to content

Instantly share code, notes, and snippets.

@ericelliott
Created August 3, 2012 22:11
Show Gist options
  • Save ericelliott/3252039 to your computer and use it in GitHub Desktop.
Save ericelliott/3252039 to your computer and use it in GitHub Desktop.
(function (app, $) {
'use strict';
var i18n = $.i18n,
whenTranslationsLoaded = app.deferred();
i18n.init({
resGetPath: app.environment.localepath + '/__lng__/__ns__.json',
fallbackLng: 'en-US',
useLocalStorage: false,
debug: false
}, function () {
whenTranslationsLoaded.resolve();
});
i18n.whenLoaded = whenTranslationsLoaded;
app.register('i18n', i18n, {
beforeRender: [whenTranslationsLoaded]
});
app.register('t', $.t);
}(applitude, jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment