i18n.js 549B

123456789101112131415161718192021222324252627
  1. import i18n from 'i18next'
  2. import { reactI18nextModule } from 'react-i18next'
  3. import fr from './translate/fr.js'
  4. import en from './translate/en.js'
  5. i18n
  6. .use(reactI18nextModule)
  7. .init({
  8. fallbackLng: 'fr',
  9. // have a common namespace used around the full app
  10. ns: ['translation'], // namespace
  11. defaultNS: 'translation',
  12. debug: true,
  13. // interpolation: {
  14. // escapeValue: false, // not needed for react!!
  15. // },
  16. react: {
  17. wait: true
  18. },
  19. resources: {
  20. en,
  21. fr
  22. }
  23. })
  24. export default i18n