Grapevine_Disease_Detection/VinEye/src/i18n/index.ts
Yanis a964cc3836 add VinEye frontend app + fix hardcoded paths + gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:30:05 +02:00

26 lines
551 B
TypeScript

import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { getLocales } from 'expo-localization';
import fr from './fr.json';
import en from './en.json';
const deviceLocale = getLocales()[0]?.languageCode ?? 'fr';
i18n
.use(initReactI18next)
.init({
resources: {
fr: { translation: fr },
en: { translation: en },
},
lng: deviceLocale === 'fr' ? 'fr' : 'en',
fallbackLng: 'fr',
interpolation: {
escapeValue: false,
},
compatibilityJSON: 'v4',
});
export default i18n;