From 6486918e3a5e6be8feab62d863d694b270cf4ff4 Mon Sep 17 00:00:00 2001 From: HenriT Date: Thu, 26 Aug 2021 20:54:29 +0300 Subject: [PATCH] Fix base url. --- src/config/i18n.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config/i18n.config.js b/src/config/i18n.config.js index 4780466..f365ad4 100644 --- a/src/config/i18n.config.js +++ b/src/config/i18n.config.js @@ -11,11 +11,12 @@ i18next .use(LanguageDetector) .use(Backend); +console.log(process.env.BASE_URL); const initialized = i18next.init({ fallbackLng: 'en', whitelist: ['en', 'fr', 'et', 'fa', 'bn', 'es'], backend: { - loadPath: `${process.env.BASE_URL}/locales/{{lng}}/{{ns}}.json`, + loadPath: `${window.location.origin}${process.env.BASE_URL}/locales/{{lng}}/{{ns}}.json`, }, detection: { order: ['querystring', 'path', 'localStorage', 'navigator'],