Skip to content

Commit b99a617

Browse files
committed
Fix: update all translation
1 parent e8688bb commit b99a617

File tree

9 files changed

+25
-91
lines changed

9 files changed

+25
-91
lines changed

src/components/settings/LanguageSettings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export const LanguageSettings = () => {
77

88
const languages = [
99
{ code: 'en', name: 'English' },
10-
{ code: 'zh', name: '中文' }
10+
{ code: 'zh_CN', name: '简体中文' },
11+
{ code: 'zh_TW', name: '繁體中文' },
12+
{ code: 'ja', name: '日本語' },
13+
{ code: 'ko', name: '한국어' },
14+
{ code: 'es', name: 'Español' }
1115
];
1216

1317
const handleLanguageChange = (langCode: string) => {

src/public/locales/zh/translation.json

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/services/i18n-service.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ import { initReactI18next } from 'react-i18next';
33
import LanguageDetector from 'i18next-browser-languagedetector';
44

55
// Import translations directly
6-
import enTranslation from '../public/locales/en/translation.json';
7-
import zhTranslation from '../public/locales/zh/translation.json';
6+
import enTranslation from '../locales/en/translation.json';
7+
import zhCNTranslation from '../locales/zh-CN/translation.json';
8+
import zhTWTranslation from '../locales/zh-TW/translation.json';
9+
import jaTranslation from '../locales/ja/translation.json';
10+
import koTranslation from '../locales/ko/translation.json';
11+
import esTranslation from '../locales/es/translation.json';
812

913
// Initialize i18n
1014
const initI18n = () => {
@@ -21,8 +25,20 @@ const initI18n = () => {
2125
en: {
2226
translation: enTranslation
2327
},
24-
zh: {
25-
translation: zhTranslation
28+
zh_CN: {
29+
translation: zhCNTranslation
30+
},
31+
zh_TW: {
32+
translation: zhTWTranslation
33+
},
34+
ja: {
35+
translation: jaTranslation
36+
},
37+
ko: {
38+
translation: koTranslation
39+
},
40+
es: {
41+
translation: esTranslation
2642
}
2743
}
2844
});

0 commit comments

Comments
 (0)