Commit b77c43d2 authored by Patrick's avatar Patrick
Browse files

Add Language for content

parent 23ebe4d8
Pipeline #1987 passed with stage
in 10 seconds
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
}, },
"imageLink":"imgs/thumbnails/visionZero.jpeg", "imageLink":"imgs/thumbnails/visionZero.jpeg",
"keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"], "keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"],
"description":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)" "description_en":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)",
"description_de":"VISION ZERO ist eine Anwendung zum sicheren Routing mit einer Visualisierung eines 3D Grids und einer Heatmap. Entwickelt bein Hackathon Event 'Neue Wege für die Mobilität in Augsburg'. (24 Stunden Zeit begrenzt)"
}, },
"links": { "links": {
"youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0", "youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0",
...@@ -27,7 +28,8 @@ ...@@ -27,7 +28,8 @@
}, },
"imageLink":"imgs/thumbnails/i_cityEbikeSharing.png", "imageLink":"imgs/thumbnails/i_cityEbikeSharing.png",
"keywords":["SensorThings API","CityGML","GIS Analyst","3D GIS","GIS Analyst", "Urban Analytics"], "keywords":["SensorThings API","CityGML","GIS Analyst","3D GIS","GIS Analyst", "Urban Analytics"],
"description":"The 3D E-bike Tracking is a 3D web-based visual analytics application designed showing various parameters from sensor systems equipped on the E-bike sharing system in the study area of a city of Stuttgart, Germany." "description_en":"The 3D E-bike Tracking is a 3D web-based visual analytics application designed showing various parameters from sensor systems equipped on the E-bike sharing system in the study area of a city of Stuttgart, Germany.",
"description_de":"Das 3D E-bike Tracking ist eine 3D Webanwendung zu visuellen Analyse und ist designed um verschiedene Parameter von Sensor Systemen zu zeigen. Die Sensoren sind am E-bike Sharing Systemes der Stadt Stuttgart (Deutschland) installiert."
}, },
"links": { "links": {
"youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0", "youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0",
...@@ -45,7 +47,8 @@ ...@@ -45,7 +47,8 @@
}, },
"imageLink":"imgs/thumbnails/hftSmart.JPG", "imageLink":"imgs/thumbnails/hftSmart.JPG",
"keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"], "keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"],
"description":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)" "description_en":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)",
"description_de":"VISION ZERO ist eine Anwendung zum sicheren Routing mit einer Visualisierung eines 3D Grids und einer Heatmap. Entwickelt bein Hackathon Event 'Neue Wege für die Mobilität in Augsburg'. (24 Stunden Zeit begrenzt)"
}, },
"links": { "links": {
"demo": "https://m4lab.hft-stuttgart.de/partizipation/" "demo": "https://m4lab.hft-stuttgart.de/partizipation/"
...@@ -62,7 +65,8 @@ ...@@ -62,7 +65,8 @@
}, },
"imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG", "imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG",
"keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"], "keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"],
"description":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)" "description_en":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)",
"description_de":"VISION ZERO ist eine Anwendung zum sicheren Routing mit einer Visualisierung eines 3D Grids und einer Heatmap. Entwickelt bein Hackathon Event 'Neue Wege für die Mobilität in Augsburg'. (24 Stunden Zeit begrenzt)"
}, },
"links": { "links": {
"youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0" "youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0"
...@@ -79,7 +83,8 @@ ...@@ -79,7 +83,8 @@
}, },
"imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG", "imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG",
"keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"], "keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"],
"description":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)" "description_en":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)",
"description_de":"VISION ZERO ist eine Anwendung zum sicheren Routing mit einer Visualisierung eines 3D Grids und einer Heatmap. Entwickelt bein Hackathon Event 'Neue Wege für die Mobilität in Augsburg'. (24 Stunden Zeit begrenzt)"
}, },
"links": { "links": {
}, },
...@@ -95,7 +100,8 @@ ...@@ -95,7 +100,8 @@
}, },
"imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG", "imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG",
"keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"], "keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"],
"description":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)" "description_en":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)",
"description_de":"VISION ZERO ist eine Anwendung zum sicheren Routing mit einer Visualisierung eines 3D Grids und einer Heatmap. Entwickelt bein Hackathon Event 'Neue Wege für die Mobilität in Augsburg'. (24 Stunden Zeit begrenzt)"
}, },
"links": { "links": {
"youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0", "youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0",
...@@ -113,7 +119,8 @@ ...@@ -113,7 +119,8 @@
}, },
"imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG", "imageLink":"imgs/thumbnails/StreamLinesCesiumZoom4.PNG",
"keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"], "keywords":["CityGML","3D GIS","GIS Analyst","Urban Analytics"],
"description":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)" "description_en":"The VISION ZERO is an application for safety routing with the visualization of 3D grid and heatmap. Developed at hackathon event 'Neue Wege für die Mobilität in Augsburg'. (24 hours time limited)",
"description_de":"VISION ZERO ist eine Anwendung zum sicheren Routing mit einer Visualisierung eines 3D Grids und einer Heatmap. Entwickelt bein Hackathon Event 'Neue Wege für die Mobilität in Augsburg'. (24 Stunden Zeit begrenzt)"
}, },
"links": { "links": {
"youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0", "youtube": "https://www.youtube.com/watch?v=64Qq31ucGy0",
......
...@@ -8,7 +8,12 @@ function addcontent(item){ ...@@ -8,7 +8,12 @@ function addcontent(item){
var YouTubelink = item.links.youtube // to be replaced by item.YouTubelink or so... var YouTubelink = item.links.youtube // to be replaced by item.YouTubelink or so...
YouTubeHTML = `<a class="btn btn-sm btn-outline-danger" href="${YouTubelink}">YouTube</a>` YouTubeHTML = `<a class="btn btn-sm btn-outline-danger" href="${YouTubelink}">YouTube</a>`
} }
var description = ""
if (lang_setting == "English"){
description = item.item.description_en
} else if (lang_setting == "Deutsch"){
description = item.item.description_de
}
// Prepare Explore Link // Prepare Explore Link
// var array_contains_explore_link = true // var array_contains_explore_link = true
var ExploreHTML = '' var ExploreHTML = ''
...@@ -23,7 +28,7 @@ function addcontent(item){ ...@@ -23,7 +28,7 @@ function addcontent(item){
'<img class="thumbimg" src="' + item.item.imageLink + '" alt="">' + '<img class="thumbimg" src="' + item.item.imageLink + '" alt="">' +
'<div class="card-body">' + '<div class="card-body">' +
'<p class="card-text-lg small">' + '<p class="card-text-lg small">' +
item.item.description + description +
'<br>' + '<br>' +
'<b><i class="fas fa-user"></i> Contact Person</b>: <a' + '<b><i class="fas fa-user"></i> Contact Person</b>: <a' +
'href="https://www.hft-stuttgart.de/p/thunyathep-santhanavanich"> ' + item.item.author.firstName + 'href="https://www.hft-stuttgart.de/p/thunyathep-santhanavanich"> ' + item.item.author.firstName +
......
// placeholder for real language selection // placeholder for real language selection
$('.selectpicker').change(function(){ $('.selectpicker').change(function(){
lang_setting = $(this).val();
language($(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()); // alert($(this).val());
}) })
var lang_setting = "English"
function language(lang){ function language(lang){
//Change the language settings of the general Elements //Change the language settings of the general Elements
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment