lets user change languages,
This commit is contained in:
barisusakli
2014-04-14 15:58:13 -04:00
parent 98b112bb36
commit 3e60451ce4
10 changed files with 156 additions and 118 deletions

View File

@@ -32,7 +32,16 @@ SocketMeta.reconnected = function(socket) {
};
SocketMeta.buildTitle = function(socket, text, callback) {
meta.title.build(text, callback);
if (socket.uid) {
user.getSettings(socket.uid, function(err, settings) {
if (err) {
return callback(err);
}
meta.title.build(text, settings.language, callback);
});
} else {
meta.title.build(text, meta.config.defaultLang, callback);
}
};
SocketMeta.updateHeader = function(socket, data, callback) {