Answer the question
In order to leave comments, you need to log in
How to move locales to src?
Hello. I need to move languages folder from public to src, but due to inexperience, I don't know where to write this line to change import. Now the code looks like this
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import Backend from 'i18next-http-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
const Languages = ['en', 'ru'];
i18n
.use(Backend)
.use(LanguageDetector)
.use(initReactI18next) .init
({
fallbackLng: 'en',
debug: false,
whitelist: Languages,
interpolation: {
escapeValue: false,
},
useSuspense: false,
},
});
export default i18n;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question