From afbbcb0142210b75b7eda1ea7999dd4fec24e420 Mon Sep 17 00:00:00 2001 From: myl7 Date: Wed, 1 Jun 2022 16:13:14 +0800 Subject: [PATCH] enable Hindi translation --- 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..1ee32b3 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 'hi': + return '🇮🇳 हिन्दी' default: return '🇬🇧 English' } diff --git a/next-i18next.config.js b/next-i18next.config.js index ea149e4..2b20f1c 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', 'hi'] }, localePath: path.resolve('public/locales'), reloadOnPrerender: process.env.NODE_ENV === 'development',