From 90130876a39858a1881526706659ffd4b08fdab5 Mon Sep 17 00:00:00 2001 From: poko Date: Thu, 14 Jul 2022 21:37:11 +0800 Subject: [PATCH] Add Traditional Chinese translate option --- components/SwitchLang.tsx | 2 ++ next-i18next.config.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/SwitchLang.tsx b/components/SwitchLang.tsx index 2f88daa..3fd07ab 100644 --- a/components/SwitchLang.tsx +++ b/components/SwitchLang.tsx @@ -21,6 +21,8 @@ const localeText = (locale: string): string => { return '🇬🇧 English' case 'zh-CN': return '🇨🇳 简体中文' + case 'zh-TW': + return '🇹🇼 繁體中文' default: return '🇬🇧 English' } diff --git a/next-i18next.config.js b/next-i18next.config.js index ea149e4..60a627d 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -3,7 +3,7 @@ const path = require('path') module.exports = { i18n: { defaultLocale: 'en', - locales: ['en', 'zh-CN'] + locales: ['en', 'zh-CN', 'zh-TW'] }, localePath: path.resolve('public/locales'), reloadOnPrerender: process.env.NODE_ENV === 'development',