Add Chinese translation (Thank you copilot, and I swear I reviewed the code carefully)

This commit is contained in:
lyc8503 committed 2025-12-23 23:22:33 +08:00
1 parent 77cdf19f7d
commit e9d8a1c842
16 files changed
+324 -68

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import en from '../locales/en/common.json';
import zhCN from '../locales/zh-CN/common.json';
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
resources: {
en: { common: en },
'zh-CN': { common: zhCN },
zh: { common: zhCN },
},
fallbackLng: 'en',
interpolation: {
escapeValue: false,
},
detection: {
order: ['navigator'],
},
});
export default i18n;