From c2253e49b61019f899cdad8ec9d1037917996bcb Mon Sep 17 00:00:00 2001 From: 0ip Date: Mon, 12 Nov 2012 18:31:02 +0100 Subject: [PATCH] Add ability to set language via URL parameter --- src/static/js/pad.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index a07b29b5e..fb1814b9b 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -111,6 +111,7 @@ function getParams() var IsnoColors = params["noColors"]; var rtl = params["rtl"]; var alwaysShowChat = params["alwaysShowChat"]; + var lang = params["lang"]; if(IsnoColors) { @@ -173,6 +174,13 @@ function getParams() chat.stickToScreen(); } } + if(lang) + { + if(lang !== "") + { + document.webL10n.setLanguage(lang); + } + } } function getUrlVars()