Implemented english, hindi and bangla language integration through i18next

This commit is contained in:
2024-09-29 15:40:10 +05:30
parent dc36a9c094
commit 59fa16cf2d
17 changed files with 401 additions and 47 deletions

19
src/i18n.js Normal file
View File

@@ -0,0 +1,19 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import Backend from 'i18next-http-backend';
i18n
.use(Backend)
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: 'en',
interpolation: { escapeValue: false},
debug: true,
backend: {
loadPath: '/locales/{{lng}}/{{ns}}.json',
},
});
export default i18n;