diff --git a/customize.dist/login.js b/customize.dist/login.js index 0e46981ea..35121f113 100644 --- a/customize.dist/login.js +++ b/customize.dist/login.js @@ -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); }); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 1204e3e27..19faf940b 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -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) {