From bf167f81a3659677dada55856f5eaf0fc469e697 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sat, 12 Mar 2022 13:01:16 +0100 Subject: [PATCH] feat(client): add "spanish (es)" language to i18n locales --- README.md | 1 + client/config/languages.ts | 5 +++++ client/next-i18next.config.js | 2 +- client/wrappers/DateWrapper.tsx | 1 + docs/docs/index.mdx | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b562cb2b7..ff3373116 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ You have complete control over what goes into your resume, how it looks, what co - German (Deutsch) - Hindi (हिन्दी) - Kannada (ಕನ್ನಡ) (@aksh1251) +- Spanish (Español) (@seba11998) - 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 7ec671572..5cd344063 100644 --- a/client/config/languages.ts +++ b/client/config/languages.ts @@ -24,6 +24,11 @@ export const languages: Language[] = [ name: 'Kannada', localName: 'ಕನ್ನಡ', }, + { + code: 'es', + name: 'Spanish', + localName: 'Español', + }, { code: 'ta', name: 'Tamil', diff --git a/client/next-i18next.config.js b/client/next-i18next.config.js index 47330cbd7..12a32b21d 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', 'kn', 'ta', 'hi'], + locales: ['de', 'en', 'es', 'kn', 'ta', 'hi'], }, nsSeparator: '.', localePath: path.resolve('./public/locales'), diff --git a/client/wrappers/DateWrapper.tsx b/client/wrappers/DateWrapper.tsx index 238069124..5e1137f58 100644 --- a/client/wrappers/DateWrapper.tsx +++ b/client/wrappers/DateWrapper.tsx @@ -10,6 +10,7 @@ const DateWrapper: React.FC = ({ children }) => { dayjs.extend(relativeTime); // Locales + require('dayjs/locale/es'); require('dayjs/locale/de'); require('dayjs/locale/hi'); require('dayjs/locale/kn'); diff --git a/docs/docs/index.mdx b/docs/docs/index.mdx index 9d05d9034..b647d8f52 100644 --- a/docs/docs/index.mdx +++ b/docs/docs/index.mdx @@ -44,7 +44,9 @@ You have complete control over what goes into your resume, how it looks, what co - English - German (Deutsch) +- Hindi (हिन्दी) - Kannada (ಕನ್ನಡ) (@aksh1251) +- Spanish (Español) (@seba11998) - Tamil (தமிழ்) Help by [translating Reactive Resume](https://translate.rxresu.me) to your language!