create Chinese translation

This commit is contained in:
Mindires
2024-03-27 13:44:42 +00:00
parent 4f933c9bab
commit 338863a110
8 changed files with 325 additions and 1 deletions

View File

@@ -2,13 +2,15 @@ import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import { en } from "./lang/en";
import { ml } from "./lang/ml";
import { zh } from "./lang/zh";
i18n
.use(initReactI18next)
.init({
resources: {
en: en,
ml: ml
ml: ml,
zh: zh
},
fallbackLng: "en",
lng: localStorage.getItem("i18nextLng") || "en",

14
src/i18n/lang/zh.ts Normal file
View File

@@ -0,0 +1,14 @@
import option from "@/assets/locale/zh/option.json";
import playground from "@/assets/locale/zh/playground.json";
import common from "@/assets/locale/zh/common.json";
import sidepanel from "@/assets/locale/zh/sidepanel.json";
import settings from "@/assets/locale/zh/settings.json";
export const zh = {
option,
playground,
common,
sidepanel,
settings
}

View File

@@ -8,4 +8,8 @@ export const supportLanguage = [
label: "മലയാളം",
value: "ml"
}
{
label: "Chinese",
value: "zh"
}
]