Yes you can, actually you can "bundle" all translation files with the code. this way, you won't have any http requests.
import i18next from 'i18next';
import enTranslations from '../path/to/locales/en/translations.json';
import deTranslations from '../path/to/locales/de/translations.json';
i18next.init({
lng: 'en',
debug: true,
resources: {
en: {
translation: enTranslations // <---- your english translations
},
de: {
translation: deTranslations
}
}
}, function(err, t) {
// initialized and ready to go!
document.getElementById('output').innerHTML = i18next.t('key');
});
For more advanced solution, you can write an i18next Backend around react-native-fs it should look similar to i18next-fs-backend. (I didn't tried this option it my self)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…