chore(env.t): expose basic env.t() implementation for 'en' so mobile app

can use the function
This commit is contained in:
Tyler Renelle 2014-04-27 13:16:54 -06:00
parent c5bfe57344
commit da548ff43f

View file

@ -255,3 +255,10 @@ module.exports.locals = function(req, res, next) {
next();
});
}
module.exports.enTranslations = function(stringName, vars){
var language = {code:'en'};
var string = translations[language.code][stringName];
if(!string) return _.template(translations[language.code].stringNotFound, {string: stringName});
return vars === undefined ? string : _.template(string, vars);
};