Fix base url.

This commit is contained in:
HenriT
2021-08-26 20:54:29 +03:00
parent b8032e9809
commit 6486918e3a

View File

@ -11,11 +11,12 @@ i18next
.use(LanguageDetector) .use(LanguageDetector)
.use(Backend); .use(Backend);
console.log(process.env.BASE_URL);
const initialized = i18next.init({ const initialized = i18next.init({
fallbackLng: 'en', fallbackLng: 'en',
whitelist: ['en', 'fr', 'et', 'fa', 'bn', 'es'], whitelist: ['en', 'fr', 'et', 'fa', 'bn', 'es'],
backend: { backend: {
loadPath: `${process.env.BASE_URL}/locales/{{lng}}/{{ns}}.json`, loadPath: `${window.location.origin}${process.env.BASE_URL}/locales/{{lng}}/{{ns}}.json`,
}, },
detection: { detection: {
order: ['querystring', 'path', 'localStorage', 'navigator'], order: ['querystring', 'path', 'localStorage', 'navigator'],