mirror of https://github.com/TriliumNext/Notes
electron: Fix loading of i18n
parent
d00c028a0c
commit
68042994e0
@ -0,0 +1,4 @@
|
||||
import { initializeTranslations } from "./src/services/i18n.js";
|
||||
|
||||
await initializeTranslations();
|
||||
await import("./electron.js")
|
||||
@ -0,0 +1,15 @@
|
||||
import i18next from "i18next";
|
||||
import Backend from "i18next-fs-backend";
|
||||
|
||||
export async function initializeTranslations() {
|
||||
// Initialize translations
|
||||
await i18next.use(Backend).init({
|
||||
lng: "ro",
|
||||
fallbackLng: "en",
|
||||
ns: "server",
|
||||
backend: {
|
||||
loadPath: "translations/{{lng}}/{{ns}}.json"
|
||||
},
|
||||
debug: true
|
||||
});
|
||||
}
|
||||
Loading…
Reference in New Issue