Turn on Chinese support (#2817)

- Readds the language selection menu choices.

- Enable default language choice based on browser setting. This is used before the menu
forces a particular choice.
This commit is contained in:
Martin Taillefer 2018-10-30 07:21:14 -07:00 committed by GitHub
parent c8bb68aea9
commit 32f569bdc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -52,6 +52,11 @@
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="gearDropdown">
<a lang="en" href="/" class="dropdown-item {{ if eq $home.Lang "en" }}active{{ end }}" onclick="createCookie('nf_lang', 'en'); return true;">English</a>
<a lang="zh" href="/zh" class="dropdown-item {{ if eq $home.Lang "zh" }}active{{ end }}" onclick="createCookie('nf_lang', 'zh'); return true;">中文</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" id="light-theme-item" href="" onclick="setActiveStyleSheet('light');return false;">{{ i18n "light_theme" }}</a>
<a class="dropdown-item" id="dark-theme-item" href="" onclick="setActiveStyleSheet('dark');return false;">{{ i18n "dark_theme" }}</a>

View File

@ -12,5 +12,4 @@
https://istio.netlify.com/* https://istio.io/:splat 301!
# Redirect to translated sites
# Uncomment the next line when Chinese is ready
# / /zh 302 Language=zh
/ /zh 302 Language=zh