Store language settings in the user object

pull/1/head
yflory 5 years ago
parent faa150be90
commit 39b3af2ae3

@ -341,6 +341,11 @@ define([
if (shouldImport) {
setMergeAnonDrive();
}
var l = Util.find(rt.proxy, ['settings', 'general', 'language']);
var LS_LANG = "CRYPTPAD_LANG";
if (l) {
localStorage.setItem(LS_LANG, l);
}
return void LocalStore.login(userHash, uname, function () {
cb(void 0, res);
});

@ -63,7 +63,10 @@ define([
common.setLanguage = function (l, cb) {
var LS_LANG = "CRYPTPAD_LANG";
localStorage.setItem(LS_LANG, l);
cb();
postMessage("SET_ATTRIBUTE", {
attr: ['general', 'language'],
value: l
}, cb);
};
common.makeNetwork = function (cb) {

Loading…
Cancel
Save