Skip to content

Commit e22ad29

Browse files
authored
Merge pull request #183 from MohdShayan/fix/navbar-translation
Fix navbar translation bug and implement multi-language support #181
2 parents a529410 + 8997e74 commit e22ad29

11 files changed

Lines changed: 535 additions & 18 deletions

File tree

about.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,30 @@
123123
href="./index.html"
124124
class="text-gray-300 hover:text-green-500"
125125
id="home"
126+
data-translate="nav-home"
126127
>Home</a
127128
>
129+
<a
130+
href="./explore.html"
131+
class="text-gray-300 hover:text-green-500"
132+
id="explore"
133+
data-translate="nav-explore"
134+
>Explore</a
135+
>
128136
<a
129137
href="./about.html"
130138
class="text-gray-300 hover:text-green-500"
131139
id="about"
140+
data-translate="nav-about"
132141
>About</a
133142
>
134143

135144
<a href="./contact.html" class="text-gray-300 hover:text-green-500"
145+
data-translate="nav-contact"
136146
>Contact</a
137147
>
138148
<a href="./faq.html" class="text-gray-300 hover:text-green-500"
149+
data-translate="nav-faqs"
139150
>FAQs</a
140151
>
141152

@@ -244,6 +255,16 @@
244255
</svg>
245256
</button>
246257

258+
<!-- Language-selector Toggle -->
259+
<div class="language-selector">
260+
<select id="language" onchange="changeLanguage()">
261+
<option value="en">English</option>
262+
<option value="fr">Français</option>
263+
<option value="es">Español</option>
264+
<option value="zh">简体中文</option>
265+
</select>
266+
</div>
267+
247268
<a
248269
href="./profile.html"
249270
class="text-gray-300 hover:text-green-500 me-4"
@@ -455,6 +476,7 @@ <h2 class="h1 fw-semibold">Join our open-source project!</h2>
455476
<script src="https://unpkg.com/typed.js@2.1.0/dist/typed.umd.js"></script>
456477
<!-- JavaScript -->
457478
<script src="./script.js"></script>
479+
<script src="./translation.js"></script>
458480
<script
459481
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
460482
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"

adventures.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,34 @@
103103
href="./index.html"
104104
class="text-gray-300 hover:text-green-500"
105105
id="home"
106+
data-translate="nav-home"
106107
>Home</a
107108
>
109+
<a
110+
href="./explore.html"
111+
class="text-gray-300 hover:text-green-500"
112+
id="explore"
113+
data-translate="nav-explore"
114+
>Explore</a
115+
>
108116
<a
109117
href="./about.html"
110118
class="text-gray-300 hover:text-green-500"
111119
id="about"
120+
data-translate="nav-about"
112121
>About</a
113122
>
114123

115124
<a
116125
href="./contact.html"
117126
class="text-gray-300 hover:text-green-500"
127+
data-translate="nav-contact"
118128
>Contact</a
119129
>
120130
<a
121131
href="./faq.html"
122132
class="text-gray-300 hover:text-green-500"
133+
data-translate="nav-faqs"
123134
>FAQs</a
124135
>
125136
<button

0 commit comments

Comments
 (0)