aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/index.html
blob: 7f4fe04f06228559b4e61794af40b847b9f5f5b7 (plain)
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
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-type" content="text/html"/>
    <link rel="SHORTCUT ICON" href="images/icons/favicon.png"/>
    <title>Service Design &amp; Creation</title>
</head>
<body>
<div id="sdc-app" class="sdc-app"></div>

<script>

(function(){

    /**
     * Bundle Import script( By Language)!
     */

    var DEFAULT_LANG = 'en';
    var lang = localStorage.getItem('user_locale') || ((navigator && (navigator.language || navigator.userLanguage)) || DEFAULT_LANG).toLowerCase();

    function writeAppBundle() {
        var supportedLangs = [
        //<!--prod:supported-langs--><!--/prod:supported-langs-->
        ];
        if(-1 === supportedLangs.indexOf(lang)) {
            lang = DEFAULT_LANG;
        }

        var bundleScript = document.createElement('script');
        bundleScript.src = 'bundle_' + lang + '.js';
        document.write(bundleScript.outerHTML);
    }

    writeAppBundle();

})()
</script>

</body>
</html>