i18n.js 533B

12345678910111213141516171819202122
  1. import i18n from 'i18next'
  2. import { reactI18nextModule } from 'react-i18next'
  3. i18n
  4. .use(reactI18nextModule)
  5. .init({
  6. fallbackLng: 'fr',
  7. // have a common namespace used around the full app
  8. ns: ['translation'], // namespace
  9. defaultNS: 'translation',
  10. debug: true,
  11. // interpolation: {
  12. // escapeValue: false, // not needed for react!!
  13. // },
  14. react: {
  15. wait: true
  16. },
  17. resources: {} // init with empty resources, they will come from frontend in app constructor
  18. })
  19. export default i18n