diff --git a/src/index.js b/src/index.js index aa05ace..02442c7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,24 +1,26 @@ import i18next from 'i18next' -i18next.init({ - resources: undefined, +if (!i18next.isInitialized) { + i18next.init({ + resources: undefined, - lng: 'en', - fallbackLng: 'en', + lng: 'en', + fallbackLng: 'en', - debug: false, - ns: ['translation'], - defaultNS: 'translation', - fallbackNS: false, - nsSeparator: false, + debug: false, + ns: ['translation'], + defaultNS: 'translation', + fallbackNS: false, + nsSeparator: false, - returnEmptyString: false, - returnObjects: false, + returnEmptyString: false, + returnObjects: false, - keySeparator: false, - react: { - wait: true, - }, -}) + keySeparator: false, + react: { + wait: true, + }, + }) +} export default i18next