chore(env.t): expose basic env.t() implementation for 'en' so mobile app
can use the function
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user