2011/7/1 Yaşar Arabacı <[email protected]>: > I got it working but wanted to get an affimation, what do you think of this > approach? > > if __name__ == "__main__": > from locale import getlocale > from os.path import exists > app = QtGui.QApplication(sys.argv) > if getlocale()[0]: > if exists("translations/" + getlocale()[0] + ".qm"): > translator = QtCore.QTranslator(app) > translator.load(getlocale()[0] + ".qm", "translations") > app.installTranslator(translator) > window = MainWindow() > window.show() > sys.exit(app.exec_())
I'd use "QLocale.system().name()" instead of "locale.getlocale()", as recommended in the Qt documentation. The rest looks ok. _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
