blob: 4550e15366b2ed80b819f959492f37b8850412c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/*global Handlebars */
define(['i18next'], function(i18n) {
'use strict';
var self = function(str) {
return i18n.t(str);
};
self.get = self;
self.init = function(path) {
i18n.init({detectLngQS: 'lang', fallbackLng: 'en', lowerCaseLng: true, getAsync: false, resGetPath: path + 'locales/__lng__/__ns__.json'});
Handlebars.registerHelper('t', self.get.bind(self));
};
return self;
});
|