language.js 3.28 KB
Newer Older
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
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
// 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;
        for (var i = 0; i < arrayLength; i++) {
            addcontent(stuff[i]);
            //Do something
        }
        });

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

var lang_setting = "2"

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")
    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
41
        // rgc_introduction.innerHTML =" (or Vote for new group name) <br>A research group introduction here ...."
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
42
43
44
45
46
47
48
49
50
51
52
53
        rgc_introduction2.innerHTML = "The research projects at HFT Stuttgart (University of Applied Sciences Stuttgart)."
        rgc_application.innerHTML = "<i class='fas fa-laptop-code'></i> Our Applications"
        rgc_applicationdesc.innerHTML = "Research Short Introduction ...."
        rgc_publication.innerHTML = "<i class='fas fa-book'></i> Our Publication"
        rgc_publicationdesc.innerHTML = "Our Publication ..."
        rgc_ourteam.innerHTML = "<i class='fas fa-user-friends'></i> Our amazing team"
        rgc_teamdesc.innerHTML = "Team Description ...."
        rgc_backtotop.innerHTML = "Back to top"
    } 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
54
        // rgc_introduction.innerHTML =" (oder Stimme für einen Gruppennamen) <br>Eine Vorstellung der Forschungsgruppe folgt hier ...."
JOE Thunyathep S's avatar
up  
JOE Thunyathep S committed
55
56
57
58
59
60
61
62
63
64
65
        rgc_introduction2.innerHTML = "Die Forschungsprojekte an der HFT Stuttgart (Hochschule für Technik Stuttgart)."
        rgc_application.innerHTML = "<i class='fas fa-laptop-code'></i> Unsere Anwendungen"
        rgc_applicationdesc.innerHTML = "Forschung Kurzvorstellung ...."
        rgc_publication.innerHTML = "<i class='fas fa-book'></i> Unsere Veröffentlichungen"
        rgc_publicationdesc.innerHTML = "Unsere Veröffentlichungen ..."
        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"
    
    }
  }