Closed david-fiaty closed 2 years ago
I have an app with 2 languages in 2 json files: en.json and fr.json. It looks like i18n is just ignoring my en.json file:
I've tried to set the locales config parameters : locales: ['en', 'fr'] And also to set a default locale: defaultLocale: 'en'
Same result, the en file seems to be ignored. What could be causing this issue?
The initialization code:
const path = require('path'); const i18n = require('i18n'); i18n.configure({ defaultLocale: 'en', directory: path.join(__dirname, './i18n') });
okay sorry, my en.json file was invalid. Closing this. Question: shouldn't the app throw an error when a json file is invalid?
I have an app with 2 languages in 2 json files: en.json and fr.json. It looks like i18n is just ignoring my en.json file:
I've tried to set the locales config parameters : locales: ['en', 'fr'] And also to set a default locale: defaultLocale: 'en'
Same result, the en file seems to be ignored. What could be causing this issue?
The initialization code: