+
+ },
+ {
+ path: "about",
+ element:
,
+ children: [
+ {
+ path: "license",
+ element:
}
- },
- fallbackLng: "en",
-
- interpolation: {
- escapeValue: false // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape
- },
-
- detection: {
- order: ['navigator'],
- caches: []
- }
- });
-
+ ]
+ }
+]);
export function App() {
- return
Loading...}>{useRoutes(routes)};
+ return (
+
+
+
+ );
}
diff --git a/src/i18n.ts b/src/i18n.ts
new file mode 100644
index 0000000..630a51b
--- /dev/null
+++ b/src/i18n.ts
@@ -0,0 +1,65 @@
+import * as en from "i18n/en.json"
+import * as zh from "i18n/zh.json"
+import * as ja from "i18n/ja.json"
+import * as ar from "i18n/ar.json"
+import * as de from "i18n/de.json"
+import * as es from "i18n/es.json"
+import * as fr from "i18n/fr.json"
+import * as it from "i18n/it.json"
+import * as ko from "i18n/ko.json"
+import * as pt from "i18n/pt.json"
+import * as ru from "i18n/ru.json"
+import i18n from "i18next";
+import { initReactI18next } from "react-i18next";
+import LanguageDetector from 'i18next-browser-languagedetector';
+import ICU from 'i18next-icu';
+i18n.use(initReactI18next) // passes i18n down to react-i18next
+ .use(LanguageDetector)
+ .use(ICU)
+ .init({
+ resources: {
+ en: {
+ translation: en
+ },
+ zh: {
+ translation: zh
+ },
+ ja: {
+ translation: ja
+ },
+ ar: {
+ translation: ar
+ },
+ de: {
+ translation: de
+ },
+ es: {
+ translation: es
+ },
+ fr: {
+ translation: fr
+ },
+ it: {
+ translation: it
+ },
+ ko: {
+ translation: ko
+ },
+ pt: {
+ translation: pt
+ },
+ ru: {
+ translation: ru
+ }
+ },
+ fallbackLng: "en",
+
+ interpolation: {
+ escapeValue: false // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape
+ },
+
+ detection: {
+ order: ['navigator'],
+ caches: []
+ }
+ });
\ No newline at end of file
diff --git a/src/main.tsx b/src/main.tsx
index e26a904..d4ecb1c 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -1,6 +1,5 @@
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
-import { BrowserRouter } from "react-router-dom";
import { App } from "./app";
import "./index.css";
import { NextUIProvider } from "@nextui-org/react";
@@ -9,10 +8,8 @@ const app = createRoot(document.getElementById("root")!);
app.render(
-
-
-
-
-
+
+
+
);
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 412e2f9..e7856ab 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -7,6 +7,7 @@ const config: Config = {
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/@nextui-org/theme/**/*.{js,ts,jsx,tsx}",
+ "./src/**/*.{js,ts,jsx,tsx,mdx}"
],
theme: {
extend: {
diff --git a/vite.config.ts b/vite.config.ts
index a5a447a..8f41c4f 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,6 +1,5 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
-import Pages from "vite-plugin-pages";
import tsconfigPaths from 'vite-tsconfig-paths';
import { chunkSplitPlugin } from 'vite-plugin-chunk-split';
@@ -8,9 +7,6 @@ import { chunkSplitPlugin } from 'vite-plugin-chunk-split';
export default defineConfig({
plugins: [
react(),
- Pages({
- dirs: "./pages/"
- }),
tsconfigPaths(),
chunkSplitPlugin()
]