First setup help
Let's try to figure out what you need.
For which environment are you looking for an i18n solution?
Special handling for serverless environments (AWS lambda, Google Cloud Functions, Azure Functions, etc...)
import i18next from 'i18next';
import Backend from 'i18next-fs-backend';
const backend = new Backend({
// path where resources get loaded from
loadPath: '/locales/{{lng}}/{{ns}}.json'
});
i18next
.use(backend)
.init({
// initImmediate: false, // setting initImediate to false, will load the resources synchronously
...opts,
...yourOptions
}); // yourOptions should not include backendOptions!Do you need a language detector for your environment?
Do you want to bundle the translations with your app?
Do you want to load the translations separate from your app via http?
Do you want to manage your translations with an awesome translation management system?
Last updated