aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/i18next.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/i18next.d.ts')
-rw-r--r--FrontEnd/src/i18next.d.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/FrontEnd/src/i18next.d.ts b/FrontEnd/src/i18next.d.ts
new file mode 100644
index 00000000..761b22f3
--- /dev/null
+++ b/FrontEnd/src/i18next.d.ts
@@ -0,0 +1,19 @@
+// import the original type declarations
+import "react-i18next";
+// import all namespaces (for the default language, only)
+import admin from "./locales/en/admin.json";
+import translation from "./locales/en/translation.json";
+
+// react-i18next versions higher than 11.11.0
+declare module "i18next" {
+ // and extend them!
+ interface CustomTypeOptions {
+ // custom namespace type if you changed it
+ defaultNS: "translation";
+ // custom resources type
+ resources: {
+ admin: typeof admin;
+ translation: typeof translation;
+ };
+ }
+}