Files
Kazier/mobile/i18n/index.ts
T
2026-09-10 07:09:42 +02:00

13 lines
303 B
TypeScript

import { I18n } from 'i18n-js';
import { getLocales } from 'expo-localization';
import fr from './fr.json';
import en from './en.json';
const i18n = new I18n({ fr, en });
i18n.defaultLocale = 'fr';
i18n.enableFallback = true;
i18n.locale = getLocales()[0]?.languageCode ?? 'fr';
export default i18n;