Skip to content

Commit fabc75a

Browse files
cengizcmataracibjohansebascarlosstenzeldpopp07
authored
feat: add language picker (#1695)
Co-authored-by: Sebastian Beltran <[email protected]> Co-authored-by: Carlos Stenzel <[email protected]> Co-authored-by: Dustin Popp <[email protected]>
1 parent 5d7c21f commit fabc75a

25 files changed

+328
-82
lines changed

_data/languages.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
- code: en
2+
name: English
3+
- code: fr
4+
name: Français
5+
- code: de
6+
name: Deutsch
7+
- code: es
8+
name: Español
9+
- code: it
10+
name: Italiano
11+
- code: ja
12+
name: 日本語
13+
- code: ru
14+
name: Русский
15+
- code: zh-cn
16+
name: 中文 (简体)
17+
- code: zh-tw
18+
name: 繁體中文
19+
- code: ko
20+
name: 한국어
21+
- code: pt-br
22+
name: Português
23+
- code: sk
24+
name: Slovenčina
25+
- code: uk
26+
name: Українська
27+
- code: uz
28+
name: Oʻzbekcha
29+
- code: tr
30+
name: Türkçe
31+
- code: th
32+
name: ภาษาไทย
33+
- code: id
34+
name: Indonesia

_includes/footer/footer-en.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
</section>
1010
<section id="footer-content">
1111
<div id="footer-copyright">
12-
<a href="https://openjsf.org/">
12+
<a href="https://openjsf.org/">
1313
<img src="https://raw.githubusercontent.com/openjs-foundation/artwork/main/openjs_foundation/openjs_foundation-logo-horizontal-color.svg" alt="OpenJS Foundation" width="125" height="39" class="hidden-dark"/>
1414
<img src="https://raw.githubusercontent.com/openjs-foundation/artwork/main/openjs_foundation/openjs_foundation-logo-horizontal-white.svg" alt="OpenJS Foundation" width="125" height="39" class="hidden-light"/>
1515
</a>
1616
<div id="footer-policy">
1717
<a href="https://terms-of-use.openjsf.org">Terms of Use</a>
18-
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
18+
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
1919
<a id="coc" href="https://github.com/expressjs/express/blob/master/Code-Of-Conduct.md">Code of Conduct</a>
2020
<a href="https://trademark-policy.openjsf.org">Trademark Policy</a>
2121
<a id="security" href="https://github.com/expressjs/express/security/policy">Security Policy</a>

_includes/footer/footer-id.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
</section>
1010
<section id="footer-content">
1111
<div id="footer-copyright">
12-
<a href="https://openjsf.org/">
12+
<a href="https://openjsf.org/">
1313
<img src="https://raw.githubusercontent.com/openjs-foundation/artwork/main/openjs_foundation/openjs_foundation-logo-horizontal-color.svg" alt="OpenJS Foundation" width="125" height="39" class="hidden-dark"/>
1414
<img src="https://raw.githubusercontent.com/openjs-foundation/artwork/main/openjs_foundation/openjs_foundation-logo-horizontal-white.svg" alt="OpenJS Foundation" width="125" height="39" class="hidden-light"/>
1515
</a>
1616
<div id="footer-policy">
1717
<a href="https://terms-of-use.openjsf.org">Terms of Use</a>
18-
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
18+
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
1919
<a id="coc" href="https://github.com/expressjs/express/blob/master/Code-Of-Conduct.md">Code of Conduct</a>
2020
<a href="https://trademark-policy.openjsf.org">Trademark Policy</a>
2121
<a id="security" href="https://github.com/expressjs/express/security/policy">Security Policy</a>

_includes/header/header-de.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@
121121
</li>
122122
</ul>
123123
</div>
124-
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
125-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
126-
<span class="sun-icon hidden-light"></span>
124+
<div class="header-right">
125+
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
126+
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
127+
<span class="sun-icon hidden-light"></span>
128+
</div>
129+
{% include language-picker.html %}
130+
{% include language-picker-mobile.html %}
127131
</div>
128132
</header>

_includes/header/header-en.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,20 +131,24 @@
131131
<a href="{{site.posts.first.url}}"{% if page.menu == 'blog' %} class="active"{% endif %}>Blog</a>
132132
<ul class="submenu-content">
133133
<li>
134-
<a href="{{site.posts.first.url}}">Latest post</a>
134+
<a href="{{site.posts.first.url}}">Latest post</a>
135135
</li>
136136
<li>
137-
<a href="/{{ page.lang }}/blog/posts.html">All posts</a>
138-
</li>
137+
<a href="/{{ page.lang }}/blog/posts.html">All posts</a>
138+
</li>
139139
<li>
140140
<a href="/{{ page.lang }}/blog/write-post.html">Write a Post</a>
141141
</li>
142142
</ul>
143-
</li>
144-
</ul>
145-
</div>
146-
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
147-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
148-
<span class="sun-icon hidden-light"></span>
149-
</div>
143+
</li>
144+
</ul>
145+
</div>
146+
<div class="header-right">
147+
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
148+
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
149+
<span class="sun-icon hidden-light"></span>
150+
</div>
151+
{% include language-picker.html %}
152+
{% include language-picker-mobile.html %}
153+
</div>
150154
</header>

_includes/header/header-es.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,13 @@
122122
</li>
123123
</ul>
124124
</div>
125-
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
126-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
127-
<span class="sun-icon hidden-light"></span>
128-
</div>
125+
<div class="header-right">
126+
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
127+
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
128+
<span class="sun-icon hidden-light"></span>
129+
</div>
130+
{% include language-picker.html %}
131+
{% include language-picker-mobile.html %}
132+
133+
</div>
129134
</header>

_includes/header/header-fr.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,12 @@
123123
</li>
124124
</ul>
125125
</div>
126-
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
127-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
126+
<div class="header-right">
127+
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
128+
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
128129
<span class="sun-icon hidden-light"></span>
129-
</div>
130+
</div>
131+
{% include language-picker.html %}
132+
{% include language-picker-mobile.html %}
133+
</div>
130134
</header>

_includes/header/header-id.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,12 @@
145145

146146
</ul>
147147
</div>
148+
<div class="header-right">
148149
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
149150
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
150151
<span class="sun-icon hidden-light"></span>
151152
</div>
153+
{% include language-picker.html %}
154+
{% include language-picker-mobile.html %}
155+
</div>
152156
</header>
153-

_includes/header/header-it.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@
119119
</li>
120120
</ul>
121121
</div>
122-
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
123-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
124-
<span class="sun-icon hidden-light"></span>
122+
<div class="header-right">
123+
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
124+
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
125+
<span class="sun-icon hidden-light"></span>
126+
</div>
127+
{% include language-picker.html %}
128+
{% include language-picker-mobile.html %}
125129
</div>
126130
</header>

_includes/header/header-ja.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,12 @@
122122
</li>
123123
</ul>
124124
</div>
125-
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
126-
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
127-
<span class="sun-icon hidden-light"></span>
128-
</div>
125+
<div class="header-right">
126+
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
127+
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
128+
<span class="sun-icon hidden-light"></span>
129+
</div>
130+
{% include language-picker.html %}
131+
{% include language-picker-mobile.html %}
132+
</div>
129133
</header>

0 commit comments

Comments
 (0)