language.js 5.77 KB
Newer Older
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
1
2
3
4
5
6
7
8
9
// placeholder for real language selection
$('.selectpicker').change(function(){
    lang_setting = $(this).val();
    language($(this).val());
    $.getJSON("./content/content.json", function(result){
        stuff = result;
        var new_row = document.getElementById("row_main")
        new_row.innerHTML = "";
        var arrayLength = stuff.length;
Joe TS Dell's avatar
update    
Joe TS Dell committed
10
        console.log("translating content")
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
11
12
13
14
        for (var i = 0; i < arrayLength; i++) {
            addcontent(stuff[i]);
            //Do something
        }
Joe TS Dell's avatar
update    
Joe TS Dell committed
15
16
17
18
19
20
21
22
23
24
25

        $.getJSON("./content/team.json", function(result){ 
            console.log("translating team")
            team = result;
            var new_row = document.getElementById("team-section")
            new_row.innerHTML = "";
            var arrayLength = team.length;
            for (var i = 0; i < arrayLength; i++) {
                addTeam(team[i]);
                //Do something
            }
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
26
        });
Joe TS Dell's avatar
update    
Joe TS Dell committed
27
    });
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
28
29
30
31

    // alert($(this).val());
})

Patrick's avatar
Patrick committed
32
var lang_setting = "1"
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

function language(lang){
    //Change the language settings of the general Elements
    
    // declare all the fields
    var rgc_about = document.getElementById("rgc_about")
    var rgc_group = document.getElementById("rgc_group")
    var rgc_contact = document.getElementById("rgc_contact")
    var rgc_introduction = document.getElementById("rgc_introduction")
    var rgc_introduction2 = document.getElementById("rgc_introduction2")
    var rgc_application = document.getElementById("rgc_application")
    var rgc_applicationdesc = document.getElementById("rgc_applicationdesc")
    var rgc_publication = document.getElementById("rgc_publication")
    var rgc_publicationdesc = document.getElementById("rgc_publicationdesc")
    var rgc_ourteam = document.getElementById("rgc_ourteam")
    var rgc_teamdesc = document.getElementById("rgc_teamdesc")
    var rgc_backtotop = document.getElementById("rgc_backtotop")
Patrick's avatar
Patrick committed
50
51
    var rgc_button_next = document.getElementById("nextbutton")
    var rgc_button_previous = document.getElementById("previousbutton")
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
52
53
54
55
    if (lang == "1"){
        rgc_about.innerHTML = "About"
        rgc_group.innerHTML = "Details about our group to be inserted here... "
        rgc_contact.innerHTML = "Contact"
Joe TS Dell's avatar
up    
Joe TS Dell committed
56
        // rgc_introduction.innerHTML =" (or Vote for new group name) <br>A research group introduction here ...."
Joe TS Dell's avatar
Joe TS Dell committed
57
        // rgc_introduction2.innerHTML = "The research projects at HFT Stuttgart (University of Applied Sciences Stuttgart)."
Joe TS Dell's avatar
Joe TS Dell committed
58
59
        rgc_application.innerHTML = "<i class='fas fa-laptop-code'></i> Research Results Explorer"
        rgc_applicationdesc.innerHTML = "Explore the diversity of our projects which is our contribution to modern, sustainable, and smarter cities. The following gallery provides an overview about the results and demos to current and former research projects within the UGL group. Watch YouTube videos with explanations to our innovative results and ideas or get direct access to our interactive demos and prototypes to explore them freely. Use the search function to look for demos with specific keywords (e.g. “wind”, “citygml”, “sensors”, etc.)."
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
60
        rgc_publication.innerHTML = "<i class='fas fa-book'></i> Our Publication"
Joe TS Dell's avatar
Joe TS Dell committed
61
62
63
        rgc_publicationdesc.innerHTML = "View the latest publications regarding our projects and other research activities at UGL. A link to the Publisher, the BiBTeX-Download or directly to the PDF of the article is just a click away."
        rgc_ourteam.innerHTML = "<i class='fas fa-user-friends'></i> Team"
        rgc_teamdesc.innerHTML = "Get to know the international and multi-disciplined UGL team members. Feel free to contact us if you have questions to projects or want to collaborate on exciting topics, projects, or publications."
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
64
        rgc_backtotop.innerHTML = "Back to top"
Patrick's avatar
Patrick committed
65
66
        rgc_button_next.innerHTML = "Next"
        rgc_button_previous.innerHTML = "Previous"
Patrick's avatar
Patrick committed
67
68
69
70
71
72

        var matches = document.getElementsByClassName('profile');

        for (var i=0; i<matches.length; i++) {
        matches[i].innerHTML = "See full profile"
        }
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
73
74
75
76
    } else if (lang == "2"){
        rgc_about.innerHTML = "About"
        rgc_group.innerHTML = "Details über unsere Gruppe... "
        rgc_contact.innerHTML = "Kontakt"
Joe TS Dell's avatar
up    
Joe TS Dell committed
77
        // rgc_introduction.innerHTML =" (oder Stimme für einen Gruppennamen) <br>Eine Vorstellung der Forschungsgruppe folgt hier ...."
Joe TS Dell's avatar
Joe TS Dell committed
78
        // rgc_introduction2.innerHTML = "Die Forschungsprojekte an der HFT Stuttgart (Hochschule für Technik Stuttgart)."
Joe TS Dell's avatar
Joe TS Dell committed
79
        rgc_application.innerHTML = "<i class='fas fa-laptop-code'></i> Forschungsergebnis-Galerie"
Joe TS Dell's avatar
Joe TS Dell committed
80
        rgc_applicationdesc.innerHTML = "Die Vielfalt der Projekte mit denen die UGL Forschungsgruppe ihren Beitrag zu modernen, nachhaltigen und smarten Städten leistet, können in der folgenden Übersicht, bestehend aus Resultaten und Demos aktueller und früherer Forschungsprojekte, erkundet werden. Ergebnisse werden u.a. in Form von YouTube-Videos mit Erklärungen zu Projekten und Ergebnisse bzw. über den direkten Zugang zu interaktiven Demos, zum freien Erkunden, präsentiert. Die Suchfunktion erlaubt es nach Schlüsselwörtern oder Autoren zu suchen (z.B. “wind”, “citygml”, “sensors”, etc.)."
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
81
        rgc_publication.innerHTML = "<i class='fas fa-book'></i> Unsere Veröffentlichungen"
Patrick's avatar
Patrick committed
82
        // rgc_publicationdesc.innerHTML = "Unsere Veröffentlichungen ..."
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
83
84
85
        rgc_ourteam.innerHTML = "<i class='fas fa-user-friends'></i> Unser Team"
        rgc_teamdesc.innerHTML = "Team Beschreibung ...."
        rgc_backtotop.innerHTML = "Zurück an den Anfang"
Patrick's avatar
Patrick committed
86
87
        rgc_button_next.innerHTML = "Weiter"
        rgc_button_previous.innerHTML = "Zurück"
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
88
    
Patrick's avatar
Patrick committed
89
90
91
92
93
        var matches = document.getElementsByClassName('profile');

        for (var i=0; i<matches.length; i++) {
        matches[i].innerHTML = "Vollständiges Profil ansehen"
        }
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
94
    }
Patrick's avatar
Patrick committed
95
    
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
96
  }