diff --git a/lang/en/plugins.json b/lang/en/plugins.json deleted file mode 100644 index 24e05e9..0000000 --- a/lang/en/plugins.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test":"test" -} diff --git a/package.json b/package.json index f81a6c7..e395078 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "discord.js": "^13.6.0", "i18next": "^21.6.13", "i18next-async-backend": "^2.0.0", + "i18next-http-backend": "^1.4.0", "i18next-resources-to-backend": "^1.0.0", "mongoose": "^6.2.3", "node-schedule": "^2.1.0", diff --git a/src/locale/index.ts b/src/locale/index.ts deleted file mode 100644 index e5e13bc..0000000 --- a/src/locale/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import i18next from "i18next"; -import AsyncBackend from "i18next-async-backend"; - -import logger from "@logger"; - -const resources = { - en: { - errors: () => import("@root/lang/en/errors.json"), - plugins: () => import("@root/lang/en/plugins.json"), - }, -}; - -export default async () => { - await i18next.use(AsyncBackend).init({ - backend: { resources }, - }); - - //i18next now can be used to translate your application - logger.silly(i18next.store.data); -}; diff --git a/tsconfig.json b/tsconfig.json index 93449a5..6fda632 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,7 @@ "moduleResolution": "node", "isolatedModules": true, "outDir": "./build", + "resolveJsonModule": true, "baseUrl": "./src", "typeRoots": ["/types/common", "./node_modules/@types"], "paths": {