feat: i18n

This commit is contained in:
2026-02-07 04:18:36 +08:00
parent d1dd75f7ab
commit 4b5d2b656b
17 changed files with 482 additions and 98 deletions

View File

@@ -0,0 +1,15 @@
import { createI18n } from "vue-i18n";
import en from "../locales/en.json";
import zhHans from "../locales/zh-Hans.json";
const i18n = createI18n({
legacy: false, // use Composition API
locale: navigator.language.startsWith("zh") ? "zh-Hans" : "en",
fallbackLocale: "en",
messages: {
en,
"zh-Hans": zhHans,
},
});
export default i18n;