-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontacts.html
128 lines (120 loc) · 3.5 KB
/
contacts.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Schedule Viewer</title>
<link rel="stylesheet" href="contacts.css" />
<script src="config.js"></script>
<script src="sms.js"></script>
<script src="iot.js"></script>
<script src="remote.js"></script>
<script src="time_script.js" defer></script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto&display=swap"
rel="stylesheet"
/>
<script src="https://unpkg.com/[email protected]/dist/umd/i18next.min.js"></script>
<script>
var curLanguage = localStorage.getItem("language") || "en";
const translationResources = {
en: {
translation: {
title: "Contacts",
call_supporter: "CALL SUPPORTER",
home: "HOME",
},
},
fr: {
translation: {
title: "Contacts",
call_supporter: "APPELER LE SOUTIEN",
home: "ACCUEIL",
},
},
};
const savedLanguage = localStorage.getItem("language") || "en";
i18next.init(
{
lng: savedLanguage, // If you want to start with English
debug: true,
resources: translationResources,
},
function (err, t) {
// Initialize your UI
}
);
function changeLanguage(lng) {
i18next.changeLanguage(lng, function (err, t) {
document.getElementById("titleID").innerText = i18next.t("title");
document.getElementById("callSupporterID").innerText =
i18next.t("call_supporter");
document.getElementById("homeButtonTextID").innerText =
i18next.t("home");
localStorage.setItem("language", lng);
curLanguage = lng;
// update your UI
});
}
</script>
</head>
<body>
<div class="topbox">
<div class="wrapper">
<img
src="img_Contacts.png"
alt="contacts logo"
height="120px"
padding="25px"
/>
<p id="titleID" class="textBeside">Contacts</p>
</div>
<div>
<img
src="gardenLoftImage.svg"
alt="garden loft logo"
class="glLogo"
height="227"
/>
</div>
</div>
<div class="emergeButton">
<img
src="img_Supporter.png"
alt="Supporter"
height="113px"
id="emergency-call"
class="emergency-call item"
/>
</div>
<p id="callSupporterID" class="textBelow">CALL SUPPORTER</p>
<div class="calendarBox">
<!-- <img
src="img_Calendar.png"
alt="calendar image"
width="1447px"
height="561px"
/> -->
</div>
<div class="lower">
<img
id="homeButtonID"
src="img_HomeEng.png"
alt="home"
onclick="window.location.href='menuCarousel.html';"
class="item"
height="113px"
/>
</div>
<div><p id="homeButtonTextID" class="textBelow">HOME</p></div>
<script src="calling.js"></script>
<script>
document.addEventListener("DOMContentLoaded", (event) => {
const savedLanguage = localStorage.getItem("language") || "en"; // Use saved language or default to 'en'
changeLanguage(savedLanguage);
});
</script>
</body>
</html>