feat: init

This commit is contained in:
2025-09-05 15:18:10 +08:00
parent ddbee614e8
commit 85244a451e
126 changed files with 3020 additions and 10278 deletions

View File

@@ -0,0 +1,12 @@
import zhCN from "@/locales/zh_CN.json";
import enUS from "@/locales/en_US.json";
import { useI18nStore } from "@/store/i18n";
export default function useI18n() {
const { lang } = useI18nStore();
const locales = lang === "en_US" ? enUS : zhCN;
return (name: string) => {
return locales[name as keyof typeof locales] || name;
};
}