Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add language picker #1695

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions _data/languages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
- code: en
name: English
- code: fr
name: Français
- code: de
name: Deutsch
- code: es
name: Español
- code: it
name: Italiano
- code: ja
name: 日本語
- code: ru
name: Русский
- code: zh-cn
name: 中文 (简体)
- code: zh-tw
name: 繁體中文
- code: ko
name: 한국어
- code: pt-br
name: Português
- code: sk
name: Slovenčina
- code: uk
name: Українська
- code: uz
name: Oʻzbekcha
- code: tr
name: Türkçe
- code: th
name: ภาษาไทย
- code: id
name: Indonesia
10 changes: 2 additions & 8 deletions _includes/footer/footer-en.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<a id="top" href="#"><img src="/images/arrow.png"></a>

<footer>
<section id="doc-langs">
Documentation translations provided by StrongLoop/IBM:
<a href="/fr/">French</a>, <a href="/de/">German</a>, <a href="/es/">Spanish</a>, <a href="/it/">Italian</a>, <a href="/ja/">Japanese</a>, <a href="/ru/">Russian</a>, <a href="/zh-cn/">Chinese</a>, <a href="/zh-tw/">Traditional Chinese</a>, <a href="/ko/">Korean</a>, <a href="/pt-br/">Portuguese</a>.
<br>
Community translation available for: <a href="/sk/">Slovak</a>, <a href="/uk/">Ukrainian</a>, <a href="/uz/">Uzbek</a>, <a href="/tr/">Turkish</a>, <a href="/th/">Thai</a> and <a href="/id/">Indonesian</a>.
</section>
<section id="footer-content">
<div id="footer-copyright">
<a href="https://openjsf.org/">
<a href="https://openjsf.org/">
<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"/>
<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"/>
</a>
<div id="footer-policy">
<a href="https://terms-of-use.openjsf.org">Terms of Use</a>
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
<a id="coc" href="https://github.com/expressjs/express/blob/master/Code-Of-Conduct.md">Code of Conduct</a>
<a href="https://trademark-policy.openjsf.org">Trademark Policy</a>
<a id="security" href="https://github.com/expressjs/express/security/policy">Security Policy</a>
Expand Down
10 changes: 2 additions & 8 deletions _includes/footer/footer-id.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<a id="top" href="#"><img src="/images/arrow.png"></a>

<footer>
<section id="doc-langs">
Dokumentasi versi terjemahan yang disediakan oleh StrongLoop/IBM:
<a href="/fr/">French</a>, <a href="/de/">German</a>, <a href="/es/">Spanish</a>, <a href="/it/">Italian</a>, <a href="/ja/">Japanese</a>, <a href="/ru/">Russian</a>, <a href="/zh-cn/">Chinese</a>, <a href="/zh-tw/">Traditional Chinese</a>, <a href="/ko/">Korean</a>, <a href="/pt-br/">Portuguese</a>.
<br>
Terjemahan oleh komunitas tersedia untuk: <a href="/sk/">Slovak</a>, <a href="/uk/">Ukrainian</a>, <a href="/uz/">Uzbek</a>, <a href="/tr/">Turkish</a>, <a href="/th/">Thai</a> dan <a href="/id/">Bahasa Indonesia</a>.
</section>
<section id="footer-content">
<div id="footer-copyright">
<a href="https://openjsf.org/">
<a href="https://openjsf.org/">
<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"/>
<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"/>
</a>
<div id="footer-policy">
<a href="https://terms-of-use.openjsf.org">Terms of Use</a>
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
<a href="https://privacy-policy.openjsf.org">Privacy Policy</a>
<a id="coc" href="https://github.com/expressjs/express/blob/master/Code-Of-Conduct.md">Code of Conduct</a>
<a href="https://trademark-policy.openjsf.org">Trademark Policy</a>
<a id="security" href="https://github.com/expressjs/express/security/policy">Security Policy</a>
Expand Down
10 changes: 7 additions & 3 deletions _includes/header/header-de.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
24 changes: 14 additions & 10 deletions _includes/header/header-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,24 @@
<a href="{{site.posts.first.url}}"{% if page.menu == 'blog' %} class="active"{% endif %}>Blog</a>
<ul class="submenu-content">
<li>
<a href="{{site.posts.first.url}}">Latest post</a>
<a href="{{site.posts.first.url}}">Latest post</a>
</li>
<li>
<a href="/{{ page.lang }}/blog/posts.html">All posts</a>
</li>
<a href="/{{ page.lang }}/blog/posts.html">All posts</a>
</li>
<li>
<a href="/{{ page.lang }}/blog/write-post.html">Write a Post</a>
</li>
</ul>
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
</li>
</ul>
</div>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
13 changes: 9 additions & 4 deletions _includes/header/header-es.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,13 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}

</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-fr.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
5 changes: 4 additions & 1 deletion _includes/header/header-id.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@
</li>
</ul>
</div>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>

10 changes: 7 additions & 3 deletions _includes/header/header-it.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
12 changes: 8 additions & 4 deletions _includes/header/header-ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
12 changes: 8 additions & 4 deletions _includes/header/header-ko.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-pt-br.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-ru.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
8 changes: 6 additions & 2 deletions _includes/header/header-sk.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-th.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-tr.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-uk.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
16 changes: 10 additions & 6 deletions _includes/header/header-uz.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ul class="submenu-content">
<li>
<a href="/{{ page.lang }}/starter/installing.html">
O'rnatish
O'rnatish
</a>
</li>
<li>
Expand All @@ -23,7 +23,7 @@
</li>
<li>
<a href="/{{ page.lang }}/starter/generator.html">
Express generator
Express generator
</a>
</li>
<li>
Expand Down Expand Up @@ -92,7 +92,7 @@
</li>
<li><a href="/{{ page.lang }}/advanced/best-practice-performance.html">Performance best practices</a>
</li>
</ul>
</ul>
</li>
<li id="resources-menu" class="submenu">
<a href="/{{ page.lang }}/resources/glossary.html"{% if page.menu == 'resources' %} class="active"{% endif %}>Resources</a>
Expand All @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
10 changes: 7 additions & 3 deletions _includes/header/header-zh-cn.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,12 @@
</li>
</ul>
</div>
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
<div class="header-right">
<div id="theme-icon-container" class="theme-toggle default-theme" title="toggle darkmode">
<i class="fa fa-moon-o fa-2x hidden-dark"></i>
<span class="sun-icon hidden-light"></span>
</div>
{% include language-picker.html %}
{% include language-picker-mobile.html %}
</div>
</header>
Loading
Loading