-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-lang-autoselect.html
35 lines (32 loc) · 1.12 KB
/
demo-lang-autoselect.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Spend Your Life</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="spend.css">
<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="js/jquery.flot.min.js"></script>
<script type="text/javascript" src="js/jquery.flot.pie.min.js"></script>
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
<script type="text/javascript" src="js/calc.js"></script>
<script type="text/javascript">
var language = window.navigator.userLanguage || window.navigator.language;
if ((/^ru/).test(language)) {
language = 'ru'
} else {
//default
language = 'en'
}
console.log("Using language: " + language)
$(document).ready(function(){
// <!-- load language files -->
$.getScript("js/expenditures."+language+".js", function() {
initCalcGui($('#calcGui'))
})
})
</script>
</head>
<body>
<div id="calcGui"></div>
</body>
</html>