From 2c4560d13a6a34897a3189608431a6e902784921 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Mon, 30 Oct 2023 13:58:37 +0100 Subject: [PATCH 1/3] Add Chinese traditional as `zh-tw` --- next-i18next.config.js | 1 + src/tools/language.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/next-i18next.config.js b/next-i18next.config.js index 779df3a63..ffc557629 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -24,6 +24,7 @@ module.exports = { 'vi', 'uk', 'zh', + 'zh-tw', 'el', 'sk', 'no', diff --git a/src/tools/language.ts b/src/tools/language.ts index 69cabde0e..aba56bac2 100644 --- a/src/tools/language.ts +++ b/src/tools/language.ts @@ -179,14 +179,24 @@ export const languages = [ country: 'VN', locale: 'vi', }, + // Chinese (Simplified) { shortName: 'zh', originalName: '中文', - translatedName: 'Chinese', + translatedName: 'Chinese (Simplified)', emoji: '🇨🇳', country: 'CN', locale: 'zh-cn', }, + // Chinese (Traditional) + { + shortName: 'zh-tw', + originalName: '中文(台灣)', + translatedName: 'Chinese (Traditional)', + emoji: '🇹🇼', + country: 'TW', + locale: 'zh-tw', + }, { originalName: 'Ελληνικά', translatedName: 'Greek', From 1ad761f217e2ce0ea5b7e950fc69e1132a8b0d8a Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Tue, 31 Oct 2023 00:52:44 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8C=90=20Update=20Chinese=20language?= =?UTF-8?q?=20mappings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/language.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/language.ts b/src/tools/language.ts index aba56bac2..5bca2f7ef 100644 --- a/src/tools/language.ts +++ b/src/tools/language.ts @@ -181,7 +181,7 @@ export const languages = [ }, // Chinese (Simplified) { - shortName: 'zh', + shortName: 'cn', originalName: '中文', translatedName: 'Chinese (Simplified)', emoji: '🇨🇳', @@ -190,7 +190,7 @@ export const languages = [ }, // Chinese (Traditional) { - shortName: 'zh-tw', + shortName: 'zh', originalName: '中文(台灣)', translatedName: 'Chinese (Traditional)', emoji: '🇹🇼', From 3d90a8b44bfc8c175ba06496fa20c06f3b0c57c7 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Tue, 31 Oct 2023 09:14:02 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8C=90=20Update=20Chinese=20language?= =?UTF-8?q?=20mappings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/language.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/language.ts b/src/tools/language.ts index 5bca2f7ef..5ca8ee2c8 100644 --- a/src/tools/language.ts +++ b/src/tools/language.ts @@ -190,7 +190,7 @@ export const languages = [ }, // Chinese (Traditional) { - shortName: 'zh', + shortName: 'tw', originalName: '中文(台灣)', translatedName: 'Chinese (Traditional)', emoji: '🇹🇼',