mawacode.de/js/lang.js

379 lines
16 KiB
JavaScript
Raw Normal View History

var language = {
2024-01-26 01:32:13 +01:00
//All english strings:
eng: {
2024-01-25 23:58:10 +01:00
//nav
homenav: "Home",
aboutmenav: "About Me",
projectsnav: "Projects",
contactnav: "Contact me",
2024-02-03 15:16:02 +01:00
lang: "🇩🇪",
lang2: "🇩🇪",
//index.html
2024-02-03 13:26:34 +01:00
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:",
2024-02-03 13:26:34 +01:00
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",
2024-02-03 13:26:34 +01:00
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
2024-01-26 00:37:26 +01:00
projectstitle: "Coming Soon!",
projects: "Nothing here yet. :)",
//contactme.html
contacttitle: "Contact",
2024-02-03 20:57:56 +01:00
contact: "Email: contact[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",
2024-02-05 22:23:14 +01:00
linuxli6: "2024 February - Arch Linux",
linuxli7: "Currently Nobara and Arch",
linux2: "Desktop: Nobara Linux",
2024-02-05 22:23:14 +01:00
linux2_2: "Laptop: Arch Linux",
linuxclick1: "Click image for complete screenshot",
linuxclick2: "Click image for complete screenshot",
linux3: "Distros I've only played around with once:",
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"
},
2024-01-26 01:32:13 +01:00
//All german strings:
ger: {
2024-01-25 23:58:10 +01:00
//nav
homenav: "Startseite",
aboutmenav: "Über Mich",
projectsnav: "Projekte",
contactnav: "Kontakt",
2024-02-03 15:16:02 +01:00
lang: "🇬🇧",
lang2: "🇬🇧",
//index.html
2024-02-03 13:26:34 +01:00
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:",
2024-02-03 13:26:34 +01:00
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",
2024-02-03 13:26:34 +01:00
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",
2024-02-03 20:57:56 +01:00
contact: "Email: contact[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",
2024-02-05 22:23:14 +01:00
linuxli6: "2024 Februar - Arch Linux",
linuxli7: "Aktuell Nobara und Arch",
linux2: "Desktop: Nobara Linux",
2024-02-05 22:23:14 +01:00
linux2_2: "Laptop: Arch Linux",
linuxclick1: "Bild anklicken für kompletten screenshot",
linuxclick2: "Bild anklicken für kompletten screenshot",
linux3: "Distros mit dennen ich nurmal rumgespielt habe:",
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"
}
};
2024-02-03 15:26:21 +01:00
//get isEnglish state from localStorage
var isEnglish = localStorage.getItem("isEnglish") === "true";
2024-01-24 23:46:37 +01:00
2024-01-26 01:32:13 +01:00
//inserting the german strings:
2024-02-03 15:26:21 +01:00
if(isEnglish===false) {
2024-01-25 23:58:10 +01:00
//nav
homenav.textContent = language.ger.homenav;
aboutmenav.textContent = language.ger.aboutmenav;
projectsnav.textContent = language.ger.projectsnav;
contactnav.textContent = language.ger.contactnav;
2024-01-26 01:32:13 +01:00
lang.textContent = language.ger.lang;
2024-02-03 15:16:02 +01:00
lang2.textContent = language.ger.lang2;
//index.html
if (window.location.pathname == '/' || window.location.href.indexOf("index") > -1) {
2024-01-25 23:58:10 +01:00
welcometitle.textContent = language.ger.welcometitle;
welcome1.textContent = language.ger.welcome1;
welcome2.textContent = language.ger.welcome2;
}
//aboutme.html
2024-01-26 00:35:51 +01:00
else if(window.location.href.indexOf("aboutme.html") > -1) {
2024-01-25 23:58:10 +01:00
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;
2024-02-03 13:26:34 +01:00
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;
2024-01-25 23:58:10 +01:00
}
//projects.html
2024-01-25 23:58:10 +01:00
else if(window.location.href.indexOf("projects") > -1) {
projectstitle.textContent = language.ger.projectstitle;
projects.textContent = language.ger.projects;
}
//contactme.html
2024-01-25 23:58:10 +01:00
else if(window.location.href.indexOf("contactme") > -1) {
contacttitle.textContent = language.ger.contacttitle;
contact.textContent = language.ger.contact;
}
//aboutme/cats.html
2024-01-25 23:58:10 +01:00
else if(window.location.href.indexOf("cats") > -1) {
catstitle.textContent = language.ger.catstitle;
cats.textContent = language.ger.cats;
}
//aboutme/linux.html
2024-01-25 23:58:10 +01:00
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;
2024-01-26 00:35:51 +01:00
linux2_2.textContent = language.ger.linux2_2;
2024-02-05 22:23:14 +01:00
linuxclick1.textContent = language.ger.linuxclick1;
linuxclick2.textContent = language.ger.linuxclick2;
2024-01-25 23:58:10 +01:00
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
2024-01-25 23:58:10 +01:00
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;
}
}
2024-01-26 01:32:13 +01:00
//inserting the english strings:
else{
2024-01-25 23:58:10 +01:00
//nav
homenav.textContent = language.eng.homenav;
aboutmenav.textContent = language.eng.aboutmenav;
projectsnav.textContent = language.eng.projectsnav;
contactnav.textContent = language.eng.contactnav;
2024-01-26 01:32:13 +01:00
lang.textContent = language.eng.lang;
2024-02-03 15:16:02 +01:00
lang2.textContent = language.eng.lang2;
2024-01-25 23:58:10 +01:00
//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;
2024-01-25 23:58:10 +01:00
}
//aboutme.html
2024-01-26 00:35:51 +01:00
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;
2024-02-03 13:26:34 +01:00
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;
2024-01-25 23:58:10 +01:00
}
//projects.html
else if(window.location.href.indexOf("projects") > -1) {
projectstitle.textContent = language.eng.projectstitle;
projects.textContent = language.eng.projects;
2024-01-25 23:58:10 +01:00
}
//contactme.html
else if(window.location.href.indexOf("contactme") > -1) {
contacttitle.textContent = language.eng.contacttitle;
contact.textContent = language.eng.contact;
2024-01-25 23:58:10 +01:00
}
//aboutme/cats.html
else if(window.location.href.indexOf("cats") > -1) {
catstitle.textContent = language.eng.catstitle;
cats.textContent = language.eng.cats;
2024-01-25 23:58:10 +01:00
}
//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;
2024-01-26 00:35:51 +01:00
linux2_2.textContent = language.eng.linux2_2;
2024-02-05 22:23:14 +01:00
linuxclick1.textContent = language.eng.linuxclick1;
linuxclick2.textContent = language.eng.linuxclick2;
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;
2024-01-25 23:58:10 +01:00
}
//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;
2024-01-25 23:58:10 +01:00
}
2024-01-24 20:16:42 +01:00
}
2024-01-24 23:07:50 +01:00
2024-01-26 01:32:13 +01:00
2024-02-03 15:26:21 +01:00
//invert isEnglish bool on click of language button
2024-01-24 23:46:37 +01:00
function langChange() {
2024-02-03 15:26:21 +01:00
isEnglish = !isEnglish;
localStorage.setItem("isEnglish", isEnglish);
console.log(isEnglish);
2024-01-24 23:46:37 +01:00
window.location.reload();
2024-01-25 00:20:29 +01:00
}
2024-01-27 15:31:42 +01:00
//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";
}
}