summaryrefslogtreecommitdiff
path: root/docs/src/pages/index.astro
diff options
context:
space:
mode:
authorGravatar Xinyuan Wang <40495740+ChelesteWang@users.noreply.github.com> 2021-08-05 00:05:00 +0800
committerGravatar GitHub <noreply@github.com> 2021-08-04 09:05:00 -0700
commit2bd178d4f95e9d1a30135a774a4b21e0bd7e20be (patch)
tree51e3b8f4ac656ebd1ebb5bc8e93109ca04803a55 /docs/src/pages/index.astro
parentc7aca2c9b258ed941f7089dfa3ad092be9419a76 (diff)
downloadastro-2bd178d4f95e9d1a30135a774a4b21e0bd7e20be.tar.gz
astro-2bd178d4f95e9d1a30135a774a4b21e0bd7e20be.tar.zst
astro-2bd178d4f95e9d1a30135a774a4b21e0bd7e20be.zip
docs(translate):translate getting-started.md into ZH (CN & TW) (#979)
* translate getting-started.md into ZH (CN & TW) * fix translate the title for getting-started.md * add zh CN & TW config in Docs * fix config "locale" * fix config.ts add route for CN & TW * fix installation.md Next Steps title 's level * translate quick-start.md & installation.md & examples.md into ZH (CN ) * Add lang variable to docs frontmatter for translations * Update docs/src/pages/zh-TW/getting-started.md Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz> Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
Diffstat (limited to 'docs/src/pages/index.astro')
-rw-r--r--docs/src/pages/index.astro6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/src/pages/index.astro b/docs/src/pages/index.astro
index 234d938ad..e156ca7eb 100644
--- a/docs/src/pages/index.astro
+++ b/docs/src/pages/index.astro
@@ -3,8 +3,10 @@ import Layout from '../layouts/MainLayout.astro';
---
<script>
- // Redirect the user, based on their browser language.
- const KNOWN_LANGUAGES = ['en', 'nl', 'fi'];
+ // This is some wip redirect code based on the browser language.
+ // A vercel.json redirect is enforced in production, so no user should ever see this page.
+ // Remove the vercel.json redirect when this is ready.
+ const KNOWN_LANGUAGES = ['en', 'nl', 'fi','zh-CN','zh-TW'];
let newLang = (window.navigator.userLanguage || window.navigator.language || 'en').substr(0, 2);
if (newLang === 'en') {
window.location.pathname = '/getting-started';