-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlang.js
More file actions
50 lines (50 loc) · 1.53 KB
/
lang.js
File metadata and controls
50 lines (50 loc) · 1.53 KB
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
41
42
43
44
45
46
47
48
49
50
const data = {
fr: {
navHome: "Home",
navAbout: "À propos",
navSkills: "Compétences",
navProjects: "Projets",
navLanguages: "Langues",
navContact: "Contact",
homeTitle: "Bonjour, je suis Alizée XIA",
homeText: "Étudiante en Master Informatique – IoT",
aboutTitle: "À propos",
aboutText: "Je suis étudiante en Master Informatique spécialisée en IoT et réseaux. Je développe en C++, Java, Python et Web.",
skillsTitle: "Compétences",
projectsTitle: "Projets",
langTitle: "Langues",
contactTitle: "Contact",
lang1: "Français – Bilingue",
lang2: "Chinois – Bilingue",
lang3: "Anglais – B2",
lang4: "Italien – A2–B1"
},
en: {
navHome: "Home",
navAbout: "About",
navSkills: "Skills",
navProjects: "Projects",
navLanguages: "Languages",
navContact: "Contact",
homeTitle: "Hi, I'm Alizée XIA",
homeText: "Master student in Computer Science – IoT",
aboutTitle: "About",
aboutText: "I am a Master student specialized in IoT and Networks. I develop in C++, Java, Python and Web.",
skillsTitle: "Skills",
projectsTitle: "Projects",
langTitle: "Languages",
contactTitle: "Contact",
lang1: "French – Bilingual",
lang2: "Chinese – Bilingual",
lang3: "English – B2",
lang4: "Italian – A2–B1"
}
}
function setLang(l) {
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.getAttribute('data-i18n');
if (data[l][key]) {
el.innerText = data[l][key];
}
});
}