var language = { //All english strings: eng: { //nav homenav: "Home", aboutmenav: "About Me", projectsnav: "Projects", contactnav: "Contact me", lang: "🇩🇪", lang2: "🇩🇪", //index.html welcometitle: "Hey!", welcome1: "My name is Malik and you have just strayed into my personal little corner of the Internet.", welcome2: "Welcome, take a look around, feel at home.", //aboutme.html aboutmetitle: "About me:", aboutme1: "Even after two decades on this planet, I never quite know what to write in these 'About Me' posts. ", aboutme2: "I'm currently learning programming, and I'm generally very interested in everything that has to do with computers.", aboutme3: "Last but not least. I love cats and even have two of these weirdos.", aboutmebutton1: "Cats", aboutmebutton2: "Linux", aboutmebutton3: "Top 10 Techno", amth1: "What I like:", amth2: "What I don't like:", amtd1: "Computer", amtd2: "Cars", amtd3: "Linux", amtd4: "Windows", amtd5: "Cats", amtd6: "Wasps", amtd7: "Tolerance", amtd8: "Toxic people", amtd9: "Techno", amtd10: "Schlager music", amtd11: "Talking & chatting", //projects.html projectstitle: "Coming Soon!", projects: "Nothing here yet. :)", //contactme.html contacttitle: "Contact", contact: "Email: malik.wachter[at]mawacode.de", //aboutme/cats.html catstitle: "My Cats!", cats: "The white cat is called Percy and the black and white cat is called Mailo.", //aboutme/linux.html linuxtitle: "Linux", linux1: "My Linux distrohop history:", linuxli1: "2021 January - Linux Mint", linuxli2: "2021 June - Kubuntu", linuxli3: "2021 July - KDE Neon", linuxli4: "2022 February - Fedora", linuxli5: "2022 June - Nobara", linuxli6: "Currently Fedora and Nobara", linux2: "Desktop: Nobara Linux", linux2_2: "Laptop: Fedora Linux", linux3: "Distros I've only played around with once:", linuxli7: "Arch Linux", linuxli8: "Artix Linux", linuxli9: "AntiX", linuxli10: "TailsOS", linux4: "Other Linux devices I own:", linuxli11: "Raspberry Pi - Rasberry Pi OS", linuxli12: "Steam Deck - SteamOS", linuxli13: "Fairphone 3+ - iodéOS", //aboutme/techno.html technotitle: "Techno Top 10", techno: "Befor you read: This top 10 list is not meant seriously. It was not rated according to any criteria. It's just a collection of songs that I currently enjoy listening to.", technoli1: "1. i wanna be your girlfriend | Dj Brice", technoli2: "2. DIE LIEBE KOMMT NICHT AUS BERLIN | Brutalismus 3000", technoli3: "3. HEISS (Floorkiller Flex) | ÅMRTÜM", technoli4: "4. Underground | Tucker", technoli5: "5. Audio Bully - Original | ANSBRO", technoli6: "6. Goes Crazy - Original Mix | RBX", technoli7: "7. As We Kick | RVLT, Ouija", technoli8: "8. Language Of The Devil | Infeed", technoli9: "9. NUR MEIN KÖRPER UND DIE ANGST | Brutalismus 3000", technoli10: "10. Atme Ein (Atme Rauch aus) | Butschi, Felix Jaehn, Fairy Mary" }, //All german strings: ger: { //nav homenav: "Startseite", aboutmenav: "Über Mich", projectsnav: "Projekte", contactnav: "Kontakt", lang: "🇬🇧", lang2: "🇬🇧", //index.html welcometitle: "Hey!", welcome1: "Mein Name ist Malik und du hast dich soeben in meine Persönliche kleine Ecke im Internet verirrt.", welcome2: "Willkommen, schau dich um, fühl dich wie zu Hause.", //aboutme.html aboutmetitle: "Über mich:", aboutme1: "Selbst nach zwei Jahrzehnten auf diesem Planeten weiß ich nie so ganz, was ich in solchen 'Über mich's schreiben soll.", aboutme2: "Ich lerne im Moment Programmieren und habe allgemein großes Interesse an allem möglichen, was mit Computern zu tun hat.", aboutme3: "Zu guter Letzt, Ich liebe Katzen und habe sogar zwei von diesen Spinnern.", aboutmebutton1: "Katzen", aboutmebutton2: "Linux", aboutmebutton3: "Top 10 Techno", amth1: "Was ich mag:", amth2: "Was ich nicht mag:", amtd1: "Computer", amtd2: "Autos", amtd3: "Linux", amtd4: "Windows", amtd5: "Katzen", amtd6: "Wespen", amtd7: "Toleranz", amtd8: "Toxische Leute", amtd9: "Techno", amtd10: "Schlagermusik", amtd11: "Labern & Chatten", //projects.html projectstitle: "Kommt bald!", projects: "Noch ist hier nichts :)", //contactme.html contacttitle: "Kontakt", contact: "Email: malik.wachter[at]mawacode.de", //aboutme/cats.html catstitle: "Meine Katzen!", cats: "Der weiße Kater heißt Percy und der schwarz-weiße Kater heißt Mailo.", //aboutme/linux.html linuxtitle: "Linux", linux1: "Meine Linux distrohop Geschichte:", linuxli1: "2021 Januar - Linux Mint", linuxli2: "2021 Juni - Kubuntu", linuxli3: "2021 Juli - KDE Neon", linuxli4: "2022 Februar - Fedora", linuxli5: "2022 Juni - Nobara", linuxli6: "Aktuell Fedora und Nobara", linux2: "Desktop: Nobara Linux", linux2_2: "Laptop: Fedora Linux", linux3: "Distros mit dennen ich nurmal rumgespielt habe:", linuxli7: "Arch Linux", linuxli8: "Artix Linux", linuxli9: "AntiX", linuxli10: "TailsOS", linux4: "Weitere Linux Geräte in meinem Besitz:", linuxli11: "Raspberry Pi - Rasberry Pi OS", linuxli12: "Steam Deck - SteamOS", linuxli13: "Fairphone 3+ - iodéOS", //aboutme/techno.html technotitle: "Techno Top 10", techno: "Vorab: Diese Top-10-Liste ist nicht ernst gemeint. Es wurde nach keinen Kriterien bewertet. Das ist nur eine Sammlung von Liedern, die ich aktuell gerne höre.", technoli1: "1. i wanna be your girlfriend | Dj Brice", technoli2: "2. DIE LIEBE KOMMT NICHT AUS BERLIN | Brutalismus 3000", technoli3: "3. HEISS (Floorkiller Flex) | ÅMRTÜM", technoli4: "4. Underground | Tucker", technoli5: "5. Audio Bully - Original | ANSBRO", technoli6: "6. Goes Crazy - Original Mix | RBX", technoli7: "7. As We Kick | RVLT, Ouija", technoli8: "8. Language Of The Devil | Infeed", technoli9: "9. NUR MEIN KÖRPER UND DIE ANGST | Brutalismus 3000", technoli10: "10. Atme Ein (Atme Rauch aus) | Butschi, Felix Jaehn, Fairy Mary" } }; //get isEnglish state from localStorage var isEnglish = localStorage.getItem("isEnglish") === "true"; //inserting the german strings: if(isEnglish===false) { //nav homenav.textContent = language.ger.homenav; aboutmenav.textContent = language.ger.aboutmenav; projectsnav.textContent = language.ger.projectsnav; contactnav.textContent = language.ger.contactnav; lang.textContent = language.ger.lang; lang2.textContent = language.ger.lang2; //index.html if (window.location.pathname == '/' || window.location.href.indexOf("index") > -1) { welcometitle.textContent = language.ger.welcometitle; welcome1.textContent = language.ger.welcome1; welcome2.textContent = language.ger.welcome2; } //aboutme.html else if(window.location.href.indexOf("aboutme.html") > -1) { aboutmetitle.textContent = language.ger.aboutmetitle; aboutme1.textContent = language.ger.aboutme1; aboutme2.textContent = language.ger.aboutme2; aboutme3.textContent = language.ger.aboutme3; aboutmebutton1.textContent = language.ger.aboutmebutton1; aboutmebutton2.textContent = language.ger.aboutmebutton2; aboutmebutton3.textContent = language.ger.aboutmebutton3; amth1.textContent = language.ger.amth1; amth2.textContent = language.ger.amth2; amtd1.textContent = language.ger.amtd1; amtd2.textContent = language.ger.amtd2; amtd3.textContent = language.ger.amtd3; amtd4.textContent = language.ger.amtd4; amtd5.textContent = language.ger.amtd5; amtd6.textContent = language.ger.amtd6; amtd7.textContent = language.ger.amtd7; amtd8.textContent = language.ger.amtd8; amtd9.textContent = language.ger.amtd9; amtd10.textContent = language.ger.amtd10; amtd11.textContent = language.ger.amtd11; } //projects.html else if(window.location.href.indexOf("projects") > -1) { projectstitle.textContent = language.ger.projectstitle; projects.textContent = language.ger.projects; } //contactme.html else if(window.location.href.indexOf("contactme") > -1) { contacttitle.textContent = language.ger.contacttitle; contact.textContent = language.ger.contact; } //aboutme/cats.html else if(window.location.href.indexOf("cats") > -1) { catstitle.textContent = language.ger.catstitle; cats.textContent = language.ger.cats; } //aboutme/linux.html else if(window.location.href.indexOf("linux") > -1) { linuxtitle.textContent = language.ger.linuxtitle; linux1.textContent = language.ger.linux1; linuxli1.textContent = language.ger.linuxli1; linuxli2.textContent = language.ger.linuxli2; linuxli3.textContent = language.ger.linuxli3; linuxli4.textContent = language.ger.linuxli4; linuxli5.textContent = language.ger.linuxli5; linuxli6.textContent = language.ger.linuxli6; linux2.textContent = language.ger.linux2; linux2_2.textContent = language.ger.linux2_2; linux3.textContent = language.ger.linux3; linuxli7.textContent = language.ger.linuxli7; linuxli8.textContent = language.ger.linuxli8; linuxli9.textContent = language.ger.linuxli9; linuxli10.textContent = language.ger.linuxli10; linux4.textContent = language.ger.linux4; linuxli11.textContent = language.ger.linuxli11; linuxli12.textContent = language.ger.linuxli12; linuxli13.textContent = language.ger.linuxli13; } //aboutme/techno.html else if(window.location.href.indexOf("techno") > -1) { technotitle.textContent = language.ger.technotitle; techno.textContent = language.ger.techno; technoli1.textContent = language.ger.technoli1; technoli2.textContent = language.ger.technoli2; technoli3.textContent = language.ger.technoli3; technoli4.textContent = language.ger.technoli4; technoli5.textContent = language.ger.technoli5; technoli6.textContent = language.ger.technoli6; technoli7.textContent = language.ger.technoli7; technoli8.textContent = language.ger.technoli8; technoli9.textContent = language.ger.technoli9; technoli10.textContent = language.ger.technoli10; } } //inserting the english strings: else{ //nav homenav.textContent = language.eng.homenav; aboutmenav.textContent = language.eng.aboutmenav; projectsnav.textContent = language.eng.projectsnav; contactnav.textContent = language.eng.contactnav; lang.textContent = language.eng.lang; lang2.textContent = language.eng.lang2; //index.html if (window.location.pathname == '/' || window.location.href.indexOf("index") > -1) { welcometitle.textContent = language.eng.welcometitle; welcome1.textContent = language.eng.welcome1; welcome2.textContent = language.eng.welcome2; } //aboutme.html else if(window.location.href.indexOf("aboutme.html") > -1) { aboutmetitle.textContent = language.eng.aboutmetitle; aboutme1.textContent = language.eng.aboutme1; aboutme2.textContent = language.eng.aboutme2; aboutme3.textContent = language.eng.aboutme3; aboutmebutton1.textContent = language.eng.aboutmebutton1; aboutmebutton2.textContent = language.eng.aboutmebutton2; aboutmebutton3.textContent = language.eng.aboutmebutton3; amth1.textContent = language.eng.amth1; amth2.textContent = language.eng.amth2; amtd1.textContent = language.eng.amtd1; amtd2.textContent = language.eng.amtd2; amtd3.textContent = language.eng.amtd3; amtd4.textContent = language.eng.amtd4; amtd5.textContent = language.eng.amtd5; amtd6.textContent = language.eng.amtd6; amtd7.textContent = language.eng.amtd7; amtd8.textContent = language.eng.amtd8; amtd9.textContent = language.eng.amtd9; amtd10.textContent = language.eng.amtd10; amtd11.textContent = language.eng.amtd11; } //projects.html else if(window.location.href.indexOf("projects") > -1) { projectstitle.textContent = language.eng.projectstitle; projects.textContent = language.eng.projects; } //contactme.html else if(window.location.href.indexOf("contactme") > -1) { contacttitle.textContent = language.eng.contacttitle; contact.textContent = language.eng.contact; } //aboutme/cats.html else if(window.location.href.indexOf("cats") > -1) { catstitle.textContent = language.eng.catstitle; cats.textContent = language.eng.cats; } //aboutme/linux.html else if(window.location.href.indexOf("linux") > -1) { linuxtitle.textContent = language.eng.linuxtitle; linux1.textContent = language.eng.linux1; linuxli1.textContent = language.eng.linuxli1; linuxli2.textContent = language.eng.linuxli2; linuxli3.textContent = language.eng.linuxli3; linuxli4.textContent = language.eng.linuxli4; linuxli5.textContent = language.eng.linuxli5; linuxli6.textContent = language.eng.linuxli6; linux2.textContent = language.eng.linux2; linux2_2.textContent = language.eng.linux2_2; linux3.textContent = language.eng.linux3; linuxli7.textContent = language.eng.linuxli7; linuxli8.textContent = language.eng.linuxli8; linuxli9.textContent = language.eng.linuxli9; linuxli10.textContent = language.eng.linuxli10; linux4.textContent = language.eng.linux4; linuxli11.textContent = language.eng.linuxli11; linuxli12.textContent = language.eng.linuxli12; linuxli13.textContent = language.eng.linuxli13; } //aboutme/techno.html else if(window.location.href.indexOf("techno") > -1) { technotitle.textContent = language.eng.technotitle; techno.textContent = language.eng.techno; technoli1.textContent = language.eng.technoli1; technoli2.textContent = language.eng.technoli2; technoli3.textContent = language.eng.technoli3; technoli4.textContent = language.eng.technoli4; technoli5.textContent = language.eng.technoli5; technoli6.textContent = language.eng.technoli6; technoli7.textContent = language.eng.technoli7; technoli8.textContent = language.eng.technoli8; technoli9.textContent = language.eng.technoli9; technoli10.textContent = language.eng.technoli10; } } //invert isEnglish bool on click of language button function langChange() { isEnglish = !isEnglish; localStorage.setItem("isEnglish", isEnglish); console.log(isEnglish); window.location.reload(); } //menu Script var menuList = document.getElementById("menuList"); menuList.style.maxHeight = "0px"; function togglemenu(){ if(menuList.style.maxHeight == "0px") { menuList.style.maxHeight = "200px"; } else { menuList.style.maxHeight = "0px"; } }