Fix language auto-detection

This commit is contained in:
Marcel Klehr 2012-11-14 19:38:35 +01:00
parent 6426b05c67
commit b416402f10
3 changed files with 20 additions and 17 deletions

View file

@ -31,7 +31,6 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<script type="text/javascript" src="static/js/l10n.js"></script>
<link rel="resource" type="application/l10n" href="locales.ini" />
<link rel="shortcut icon" href="<%=settings.favicon%>">
@ -188,11 +187,11 @@
(function(document) {
// Set language for l10n
var language = document.cookie.match(/language=(\w{2})/);
document.documentElement.lang = language? language[1] : 'en';
if(language) document.documentElement.lang = language[1];
})(document)
// start the custom js
if (typeof customStart == "function") customStart();
</script>
<script type="text/javascript" src="static/js/l10n.js"></script>
</html>