diff options
author | Marcel Klehr <mklehr@gmx.net> | 2012-11-21 17:45:01 +0100 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2012-11-21 17:45:01 +0100 |
commit | dcb3da829d07c73229a3d95862cb289bcd96a842 (patch) | |
tree | 4873f5feec731cd284b67739554e415639924f40 /src/static/js/l10n.js | |
parent | a6cbcc9d519901b0accd3d2a534c8ad16ea6046c (diff) | |
download | etherpad-lite-dcb3da829d07c73229a3d95862cb289bcd96a842.zip |
Fix #1186 Autodetection wouldn't work correctly in IE9
Diffstat (limited to 'src/static/js/l10n.js')
-rw-r--r-- | src/static/js/l10n.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/static/js/l10n.js b/src/static/js/l10n.js index 1d232908..ef8218d3 100644 --- a/src/static/js/l10n.js +++ b/src/static/js/l10n.js @@ -902,7 +902,7 @@ document.webL10n = (function(window, document, undefined) { // browser-specific startup if (document.addEventListener) { // modern browsers and IE9+ document.addEventListener('DOMContentLoaded', function() { - var lang = document.documentElement.lang || navigator.language; + var lang = document.documentElement.lang || navigator.language || navigator.userLanguage || 'en'; loadLocale(lang, translateFragment); }, false); } else if (window.attachEvent) { // IE8 and before (= oldIE) @@ -977,7 +977,7 @@ document.webL10n = (function(window, document, undefined) { // startup for IE<9 window.attachEvent('onload', function() { gTextProp = document.body.textContent ? 'textContent' : 'innerText'; - var lang = document.documentElement.lang || window.navigator.userLanguage; + var lang = document.documentElement.lang || navigator.language || navigator.userLanguage || 'en'; loadLocale(lang, translateFragment); }); } |