summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-01-10 19:53:11 +0100
committerYorhel <git@yorhel.nl>2010-01-10 19:53:11 +0100
commit402e350d968f3a9753e20f665edf000530c654c9 (patch)
tree25dacc8fb7ed3582aa673bd7c061f2682d228416
parentd63dbc37d027ee68ce2bc05d42ac1cd32ccd5c52 (diff)
JS: Fixed bug with determining which language should be used
The 'l10n' cookie doesn't always exist, so use the language tag in the HTML code instead.
-rw-r--r--data/script.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/script.js b/data/script.js
index 8f725b12..87bcb288 100644
--- a/data/script.js
+++ b/data/script.js
@@ -160,7 +160,7 @@ function shorten(v, l) {
* - Only supports [_n], ~[, ~]
* - When it finds [quant,_n,..], it will only return the first argument (and doesn't support ~ in an argument)
* assumes that a TL structure called 'L10N_STR' is defined in the header of this file */
-var mt_curlang = getCookie('l10n') || 'en';
+var mt_curlang = byName(byId('lang_select'), 'acronym')[0].className.substr(11, 2);
function mt() {
var key = arguments[0];
var val = L10N_STR[key] ? L10N_STR[key][mt_curlang] || L10N_STR[key].en : key;