Skip to content

Commit

Permalink
feat: add French translation (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabio authored Jan 22, 2024
1 parent c7591e9 commit 2e78f4b
Show file tree
Hide file tree
Showing 2 changed files with 339 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ import LanguageDetector from 'i18next-browser-languagedetector';

import { FALLBACK_LANGUAGE } from "../app/contents/constants";
import en from "./locales/en.json";
import fr from "./locales/fr.json";
import it from "./locales/it.json";

const resources = {
en: { translation: en },
fr: { translation: fr },
it: { translation: it },
};

i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
resources: {
en: { translation: en },
it: { translation: it },
},
supportedLngs: ["en", "it"],
resources,
supportedLngs: Object.keys(resources),
nonExplicitSupportedLngs: true, // make pass eg. "en-US" if "en" is in supportedLngs
fallbackLng: FALLBACK_LANGUAGE,
interpolation: {
Expand Down
Loading

0 comments on commit 2e78f4b

Please sign in to comment.