added defaultLang support, #4655

This commit is contained in:
Julian Lam
2016-05-16 15:23:21 -04:00
parent 437770538c
commit ffa051e828
2 changed files with 20 additions and 0 deletions

View File

@@ -91,6 +91,16 @@ var middleware;
// });
async.waterfall([
function(next) {
// Build language code list
fs.readdir(path.join(__dirname, '../public/language'), function(err, directories) {
Plugins.languageCodes = directories.filter(function(code) {
return code !== 'TODO';
});
next();
});
},
function(next) {
db.getSortedSetRange('plugins:active', 0, -1, next);
},