jellyfin-expo/i18n.js
2020-07-17 11:44:52 -04:00

28 lines
590 B
JavaScript

import * as Localization from 'expo-localization';
import i18next from 'i18next';
import { initReactI18next } from 'react-i18next';
import en from './langs/en.json';
import de from './langs/de.json';
import es from './langs/es.json';
import fr from './langs/fr.json';
const resources = {
en: { translation: en },
de: { translation: de },
es: { translation: es },
fr: { translation: fr }
};
i18next
.use(initReactI18next)
.init({
// debug: true,
fallbackLng: 'en',
lng: Localization.locale,
interpolation: {
escapeValue: false
},
resources
});