mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
fix(web): loading from root instead of base path (#3342)
This fixes an issue where we were loading the locales from the root rather than the base path.
This commit is contained in:
parent
b7e40d7319
commit
cb46e9064b
|
@ -3,6 +3,10 @@ import LanguageDetector from "i18next-browser-languagedetector";
|
|||
import Backend from "i18next-http-backend";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
|
||||
import { getBasePath } from "@utils/BasePath";
|
||||
|
||||
const basePath = getBasePath();
|
||||
|
||||
i18n.use(Backend)
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
|
@ -12,7 +16,7 @@ i18n.use(Backend)
|
|||
lookupQuerystring: "lng",
|
||||
},
|
||||
backend: {
|
||||
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
||||
loadPath: basePath + "/locales/{{lng}}/{{ns}}.json",
|
||||
},
|
||||
ns: ["portal"],
|
||||
defaultNS: "portal",
|
||||
|
|
Loading…
Reference in New Issue
Block a user