Now supports running under a sub path
Just set the SPOOLMAN_BASE_PATH environment variable and it should work. Resolves #95
This commit is contained in:
@@ -2,6 +2,7 @@ import i18n from "i18next";
|
||||
import detector from "i18next-browser-languagedetector";
|
||||
import Backend from "i18next-xhr-backend";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import { getBasePath } from "./utils/url";
|
||||
|
||||
interface Language {
|
||||
name: string;
|
||||
@@ -106,7 +107,7 @@ i18n
|
||||
.init({
|
||||
supportedLngs: Object.keys(languages),
|
||||
backend: {
|
||||
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
||||
loadPath: getBasePath() + "/locales/{{lng}}/{{ns}}.json",
|
||||
},
|
||||
defaultNS: "common",
|
||||
fallbackLng: "en",
|
||||
|
||||
Reference in New Issue
Block a user