From b8b52c448b0d398aa484fab9a19b52c044121597 Mon Sep 17 00:00:00 2001 From: Zefanja Jobse Date: Mon, 13 Nov 2023 09:34:47 +0100 Subject: [PATCH] add french as a option --- src/locales/ChangeLanguage.tsx | 1 + src/locales/config.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/locales/ChangeLanguage.tsx b/src/locales/ChangeLanguage.tsx index 716deb61..e202eb71 100644 --- a/src/locales/ChangeLanguage.tsx +++ b/src/locales/ChangeLanguage.tsx @@ -18,6 +18,7 @@ const LanguageSelector = (): JSX.Element => { + ); }; diff --git a/src/locales/config.ts b/src/locales/config.ts index 8af10f04..3d3c89af 100644 --- a/src/locales/config.ts +++ b/src/locales/config.ts @@ -2,7 +2,7 @@ import i18n from "i18next"; import { initReactI18next } from "react-i18next"; import LanguageDetector from "i18next-browser-languagedetector"; import { format, formatDistanceToNowStrict } from "date-fns"; -import { enUS, tr, zhCN, nl, ru, de } from "date-fns/locale"; +import { enUS, tr, zhCN, nl, ru, de, fr } from "date-fns/locale"; import { registerLocale } from "i18n-iso-countries"; import resourcesToBackend from "i18next-resources-to-backend"; @@ -13,9 +13,10 @@ const locales = { "nl-NL": nl, "de-DE": de, "ru-RU": ru, + "fr-FR": fr, }; -const langFile = { "de-DE": "de_DE" }; +const langFile = { "de-DE": "de_DE", "fr-FR": "fr_FR" }; i18n .use(