mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 07:55:07 +00:00
16 lines
545 B
TypeScript
16 lines
545 B
TypeScript
import i18next from "i18next";
|
|
import resourcesToBackend from "i18next-resources-to-backend";
|
|
|
|
i18next
|
|
.use(resourcesToBackend((language, namespace) => import(`./public/locales/${namespace}/${language}.json`, {
|
|
assert: { type: "json" },
|
|
})))
|
|
.init({
|
|
// debug: true,
|
|
ns: ["common"], // Preload this namespace, no need to add the others, they will load once their module is loaded
|
|
defaultNS: "common",
|
|
fallbackLng: "en",
|
|
interpolation: {
|
|
escapeValue: false,
|
|
}
|
|
}); |