mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
feat(website/i18n): set up
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
"preview": "pnpm build && vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"i18next": "25.6.0",
|
||||
"i18next-http-backend": "3.0.2",
|
||||
"preact": "10.27.2",
|
||||
"preact-iso": "2.11.0",
|
||||
"preact-render-to-string": "6.6.2"
|
||||
|
||||
16
apps/website/src/i18n.ts
Normal file
16
apps/website/src/i18n.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { default as i18next } from "i18next";
|
||||
import HttpApi from 'i18next-http-backend';
|
||||
|
||||
console.log("INIT I18NEXT");
|
||||
i18next.use(HttpApi)
|
||||
await i18next.init({
|
||||
debug: true,
|
||||
lng: "en",
|
||||
fallbackLng: "en",
|
||||
backend: {
|
||||
loadPath: "/translations/{{lng}}/{{ns}}.json",
|
||||
},
|
||||
returnEmptyString: false
|
||||
});
|
||||
|
||||
export const t = i18next.t;
|
||||
Reference in New Issue
Block a user