diff --git a/src/eda_qt/eda_qt.pro b/src/eda_qt/eda_qt.pro
index d021934..cc000c2 100644
--- a/src/eda_qt/eda_qt.pro
+++ b/src/eda_qt/eda_qt.pro
@@ -17,6 +17,8 @@ RC_ICONS = icon.ico
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+TRANSLATIONS += English.ts\
+ Chinese.ts
SOURCES += \
about_dialog.cpp \
diff --git a/src/eda_qt/mainwindow.cpp b/src/eda_qt/mainwindow.cpp
index fdc1a8e..3e0d1a3 100644
--- a/src/eda_qt/mainwindow.cpp
+++ b/src/eda_qt/mainwindow.cpp
@@ -1110,3 +1110,23 @@ void MainWindow::on_actionAdd_to_popular_triggered()
}
}
}
+
+
+
+void MainWindow::on_actionChinese_triggered()
+{
+ QTranslator m;
+ QString currentPath = QCoreApplication::applicationDirPath();
+ m.load(currentPath+"/lang/Chinese.qm");
+ qApp->installTranslator(&m);
+ this->ui->retranslateUi(this);
+}
+
+void MainWindow::on_actionEnglish_triggered()
+{
+ QString currentPath = QCoreApplication::applicationDirPath();
+ QTranslator m;
+ m.load(currentPath+"/lang/English.qm");
+ qApp->installTranslator(&m);
+ this->ui->retranslateUi(this);
+}
diff --git a/src/eda_qt/mainwindow.h b/src/eda_qt/mainwindow.h
index 99c3d91..c79f6e1 100644
--- a/src/eda_qt/mainwindow.h
+++ b/src/eda_qt/mainwindow.h
@@ -81,6 +81,10 @@ private slots:
void on_actionAdd_to_popular_triggered();
+ void on_actionChinese_triggered();
+
+ void on_actionEnglish_triggered();
+
private:
Ui::MainWindow *ui;
diff --git a/src/eda_qt/mainwindow.ui b/src/eda_qt/mainwindow.ui
index 67e2e4b..5b172a2 100644
--- a/src/eda_qt/mainwindow.ui
+++ b/src/eda_qt/mainwindow.ui
@@ -137,7 +137,7 @@
- 1
+ 0
@@ -149,7 +149,7 @@
- Page 1
+ Popular
@@ -162,7 +162,7 @@
- System
+ Examples
@@ -377,9 +377,29 @@ p, li { white-space: pre-wrap; }
+
+
@@ -458,6 +478,16 @@ p, li { white-space: pre-wrap; }
Add to popular
+
+
+ Chinese
+
+
+
+
+ English
+
+