From 6446281254726f42d8af2caa0ce28057959e0aaf Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sun, 16 Dec 2012 19:40:17 +0100 Subject: [PATCH] Migrate lang picker and embed param to html10n.js --- src/static/js/pad.js | 2 +- src/static/js/pad_editor.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index 9ad701b38..a02d7abbc 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -180,7 +180,7 @@ function getParams() { if(lang !== "") { - document.webL10n.setLanguage(lang); + window.html10n.localize([lang, 'en']); } } } diff --git a/src/static/js/pad_editor.js b/src/static/js/pad_editor.js index 690dde377..4e62e393f 100644 --- a/src/static/js/pad_editor.js +++ b/src/static/js/pad_editor.js @@ -75,10 +75,10 @@ var padeditor = (function() { pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace'); }); - $("#languagemenu").val(document.webL10n.getLanguage()); + $("#languagemenu").val(document.html10n.getLanguage()); $("#languagemenu").change(function() { pad.createCookie("language",$("#languagemenu").val(),null,'/'); - document.webL10n.setLanguage($("#languagemenu").val()); + document.webL10n.localize([$("#languagemenu").val(), 'en']); }); }, setViewOptions: function(newOptions)