fork: move from guezoloic repo

This commit is contained in:
2026-01-24 13:29:26 +01:00
parent 75ebf27385
commit e7c093935e
31 changed files with 5377 additions and 0 deletions

23
src/utils/translation.ts Normal file
View File

@@ -0,0 +1,23 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import en from '../locales/en.json';
import fr from '../locales/fr.json';
const resources = { en: { translation: en }, fr: { translation: fr } };
const userLang = navigator.language.startsWith('fr') ? 'fr' : 'en';
i18n
.use(initReactI18next)
.init({
resources,
lng: userLang,
fallbackLng: 'en',
interpolation: { escapeValue: false },
})
;
document.documentElement.lang = i18n.language;
export default i18n;