diff --git a/statapp/__main__.py b/statapp/__main__.py index 3005bdb..7f6ccba 100644 --- a/statapp/__main__.py +++ b/statapp/__main__.py @@ -1,4 +1,6 @@ import sys + +from PySide2 import QtCore from PySide2.QtWidgets import QApplication from statapp.main_window import MainWindow @@ -6,6 +8,13 @@ from statapp.main_window import MainWindow def main(): app = QApplication(sys.argv) + + translator = QtCore.QTranslator(app) + locale = QtCore.QLocale.system().name() + path = QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath) + translator.load('qt_%s' % locale, path) + app.installTranslator(translator) + window = MainWindow() window.show() return app.exec_()