From 549363bbe5bdd781699dea9506bd4baedf5740d1 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 14 Mar 2022 09:23:01 +0100 Subject: [PATCH] feat(i18n): add Chinese (Simplified) language to locales --- README.md | 1 + client/config/languages.ts | 5 +++++ client/next-i18next.config.js | 2 +- client/wrappers/DateWrapper.tsx | 1 + docs/docs/index.mdx | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a1c50a8a..470f8c59 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ You have complete control over what goes into your resume, how it looks, what co ## Languages - Bengali (বাংলা) +- Chinese (中文) - English - French (Français) - German (Deutsch) diff --git a/client/config/languages.ts b/client/config/languages.ts index 5756080d..00b8754a 100644 --- a/client/config/languages.ts +++ b/client/config/languages.ts @@ -10,6 +10,11 @@ export const languages: Language[] = [ name: 'Bengali', localName: 'বাংলা', }, + { + code: 'zh', + name: 'Chinese', + localName: '中文', + }, { code: 'en', name: 'English', diff --git a/client/next-i18next.config.js b/client/next-i18next.config.js index 41f24be4..d4ee5bf5 100644 --- a/client/next-i18next.config.js +++ b/client/next-i18next.config.js @@ -3,7 +3,7 @@ const path = require('path'); const i18nConfig = { i18n: { defaultLocale: 'en', - locales: ['bn', 'de', 'en', 'es', 'fr', 'hi', 'it', 'kn', 'ta'], + locales: ['bn', 'de', 'en', 'es', 'fr', 'hi', 'it', 'kn', 'ta', 'zh'], }, nsSeparator: '.', localePath: path.resolve('./public/locales'), diff --git a/client/wrappers/DateWrapper.tsx b/client/wrappers/DateWrapper.tsx index ff38ede5..e26f2065 100644 --- a/client/wrappers/DateWrapper.tsx +++ b/client/wrappers/DateWrapper.tsx @@ -19,6 +19,7 @@ const DateWrapper: React.FC = ({ children }) => { require('dayjs/locale/it'); require('dayjs/locale/kn'); require('dayjs/locale/ta'); + require('dayjs/locale/zh'); locale && dayjs.locale(locale); }, [locale]); diff --git a/docs/docs/index.mdx b/docs/docs/index.mdx index c751fdbe..bef44f08 100644 --- a/docs/docs/index.mdx +++ b/docs/docs/index.mdx @@ -45,6 +45,7 @@ You have complete control over what goes into your resume, how it looks, what co ## Languages - Bengali (বাংলা) +- Chinese (中文) - English - French (Français) - German (Deutsch)