diff --git a/src/meta.js b/src/meta.js index 97ab9cfa27..d46d0270c1 100644 --- a/src/meta.js +++ b/src/meta.js @@ -46,10 +46,18 @@ var fs = require('fs'), set: function (field, value, callback) { db.setObjectField('config', field, value, function(err, res) { if (callback) { - if(!err && Meta.config) + if(!err && Meta.config) { Meta.config[field] = value; + } + callback(err, res); } + + // this might be a good spot to add a hook + if (field === 'defaultLang') { + var translator = require('../public/src/translator'); + translator.loadServer(); + } }); }, setOnEmpty: function (field, value, callback) {