From 21931bc324b5e2440baaaaa2e52a93b4f2c766f8 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 14 Mar 2022 06:40:16 +0100 Subject: [PATCH] feat(i18n): add Bengali, Italian and other languages --- README.md | 7 +++++-- client/config/languages.ts | 15 +++++++++++++++ client/next-i18next.config.js | 2 +- client/wrappers/DateWrapper.tsx | 6 +++++- docs/docs/index.mdx | 7 +++++-- 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ca189a55..a1c50a8a 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,14 @@ You have complete control over what goes into your resume, how it looks, what co ## Languages +- Bengali (বাংলা) - English +- French (Français) - German (Deutsch) - Hindi (हिन्दी) -- Kannada (ಕನ್ನಡ) (@aksh1251) -- Spanish (Español) (@seba11998) +- Italian (Italiano) +- Kannada (ಕನ್ನಡ) +- Spanish (Español) - Tamil (தமிழ்) Help by [translating Reactive Resume](https://translate.rxresu.me) to your language! diff --git a/client/config/languages.ts b/client/config/languages.ts index 5cd34406..5756080d 100644 --- a/client/config/languages.ts +++ b/client/config/languages.ts @@ -5,10 +5,20 @@ export type Language = { }; export const languages: Language[] = [ + { + code: 'bn', + name: 'Bengali', + localName: 'বাংলা', + }, { code: 'en', name: 'English', }, + { + code: 'fr', + name: 'French', + localName: 'Français', + }, { code: 'de', name: 'German', @@ -19,6 +29,11 @@ export const languages: Language[] = [ name: 'Hindi', localName: 'हिन्दी', }, + { + code: 'it', + name: 'Italian', + localName: 'Italiano', + }, { code: 'kn', name: 'Kannada', diff --git a/client/next-i18next.config.js b/client/next-i18next.config.js index 12a32b21..41f24be4 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: ['de', 'en', 'es', 'kn', 'ta', 'hi'], + locales: ['bn', 'de', 'en', 'es', 'fr', 'hi', 'it', 'kn', 'ta'], }, nsSeparator: '.', localePath: path.resolve('./public/locales'), diff --git a/client/wrappers/DateWrapper.tsx b/client/wrappers/DateWrapper.tsx index 5e1137f5..ff38ede5 100644 --- a/client/wrappers/DateWrapper.tsx +++ b/client/wrappers/DateWrapper.tsx @@ -10,9 +10,13 @@ const DateWrapper: React.FC = ({ children }) => { dayjs.extend(relativeTime); // Locales - require('dayjs/locale/es'); + require('dayjs/locale/bn'); require('dayjs/locale/de'); + require('dayjs/locale/en'); + require('dayjs/locale/es'); + require('dayjs/locale/fr'); require('dayjs/locale/hi'); + require('dayjs/locale/it'); require('dayjs/locale/kn'); require('dayjs/locale/ta'); diff --git a/docs/docs/index.mdx b/docs/docs/index.mdx index 0ad1d551..1b8e7b4c 100644 --- a/docs/docs/index.mdx +++ b/docs/docs/index.mdx @@ -43,11 +43,14 @@ You have complete control over what goes into your resume, how it looks, what co ## Languages +- Bengali (বাংলা) - English +- French (Français) - German (Deutsch) - Hindi (हिन्दी) -- Kannada (ಕನ್ನಡ) (@aksh1251) -- Spanish (Español) (@seba11998) +- Italian (Italiano) +- Kannada (ಕನ್ನಡ) +- Spanish (Español) - Tamil (தமிழ்) Help by [translating Reactive Resume](https://translate.rxresu.me) to your language!