forked from thelgevold/angular-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
i18n.html
29 lines (23 loc) · 840 Bytes
/
i18n.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
<html>
<head>
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
</head>
<body>
<div class="container">
<a class="btn btn-primary btn-lg" href="i18n.html?language=en">English</a>
<a class="btn btn-primary btn-lg" href="i18n.html?language=no">Norwegian</a>
<p class="bg-success">
<my-app></my-app>
</p>
</div>
<script>
var params = new URLSearchParams(location.search.slice(1));
var language = params.get('language') || 'en';
var script = document.createElement('script');
script.setAttribute('src','i18n/dist/build-' + language + '.js');
document.head.appendChild(script);
</script>
</body>
</html>