function addcontent(item){
    var lang_cont_person = ""
    var lang_keywords = ""
    var new_row = document.getElementById("row_main")
    if(item === undefined) {

    }else{
      
    
    // Prepare YouTube Link
    // var array_contains_youtube = true
    var YouTubeHTML = ''
    if ('youtube' in item.links) { // to be replaced by if (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}" target="_blank">YouTube</a>` 
    }
    var description = ""
    if (lang_setting == "1"){
        description = item.item.description_en
        lang_cont_person = " Contact Person"
        lang_keywords = " Keywords"
    } else if (lang_setting == "2"){
        description = item.item.description_de
        lang_cont_person = " Kontaktperson"
        lang_keywords = " Stichworte"
    }
    // Prepare Explore Link
    // var array_contains_explore_link = true
    var ExploreHTML = ''
    if ('demo' in item.links) { // to be replaced by if (item.YouTubelink) or so...
      var ExploreLink = item.links.demo // to be replaced by item.ExploreLink or so...
      ExploreHTML = `<a class="btn btn-sm btn-outline-secondary" href="${ExploreLink}" target="_blank">Explore</a>` 
    }

    new_row.innerHTML = new_row.innerHTML + '<div class="col-lg-4">' +
    '<div class="card mb-4 shadow-sm extension">' +
      '<h5>'+ item.item.title +' <span class="lead text-muted"> ' + item.item.project + '</span></h5>' +
      '<img class="thumbimg" src="' + item.item.imageLink + '" alt="">' +
      '<div class="card-body">' +
        '<p class="card-text-lg small">' +
          description +
          '<br>' +
          '<b><i class="fas fa-user"></i>' + lang_cont_person + '</b>: <a ' +
          ' href="https://www.hft-stuttgart.de/p/'+ replaceUmlauts(item.item.author.firstName) +'-' + replaceUmlauts(item.item.author.lastName) + ' "> ' + item.item.author.firstName +
          ' ' + item.item.author.lastName + '</a> <br>' +
          '<b><i class="fas fa-star"></i>' + lang_keywords + '</b>: ' + item.item.keywords.join(', ') + '</br>' +
        ExploreHTML + '&nbsp;' +
        YouTubeHTML +
        '</p>' +
      '</div>' +
    '</div>' +
  '</div>'
}
}

function replaceUmlauts(value)
{

    value = value.replace('ä', 'ae');
    value = value.replace('ö', 'oe');
    value = value.replace('ü', 'ue');
    return value;
}