How to use both remote JSON files and local JSON files in React use i18next

21 Views Asked by At
i18next.use(ChainedBackend).init({
    backend: {
      backends: [
        HttpBackend, 
        resourcesToBackend((language, namespace) =>import(`./locales/${language}/${namespace}.json`))

      ],
      backendOptions: [{
        loadPath: 'http://xxx/{{lng}}/{{ns}}.json'
      }]
    }
})

I want to use both remote JSON files and local JSON files, what should I do

0

There are 0 best solutions below