problem to translate my App
-
Hello everybody,
i made a little app with QtDesigner and i wanted to translate it in french with QtLinguist,
i follow all the steps :- Adding the ts files in my_project.pro.
- Generate the ts file with l update.
- I translated my app using QtLinguist.
- I generate my fr.qm file with lrelease ,
i'm sure all the steps are correct, when i try to translate my app, the file is loaded but i always see the defaut Text ( english )
i need your help, thanks
-
Did you actually translate something with qt linguist?
-
@Christian-Ehrlicher Yes of course, here is my qm File
-
@Zunneh said in problem to translate my App:
my qm File
You meant ts-file. And did you run lrelease afterwards?
-
@Christian-Ehrlicher
Yes the first generate the ts, opening Qt Linguist then after saving the changes i generated the qm from Qt -
@Zunneh it looks like the problem is widget creation order...
From QTranslator class documentation:
Note that the translator must be created before the application's widgets.
And your MainWindow object w is just before the QTranslator object t :-(
-
@Pablo-J-Rogina Thank you you resolve my probem :)