Re: [Interest] Embedding language translation as resource

2021-04-26 Thread Tony Rietwyk
Further to Robert's reply, you need to change the file name in both the qrc file and in main.cpp. Regards, Tony On 27/04/2021 3:31 pm, Robert Hairgrove wrote: You need to load the ".qm" file which is the binary generated by running lrelease, not the ".ts" file. In addition to your "hello_l

Re: [Interest] Embedding language translation as resource

2021-04-26 Thread Robert Hairgrove
You need to load the ".qm" file which is the binary generated by running lrelease, not the ".ts" file. In addition to your "hello_la.qm" file, you might want to load Qt's "qtbase_la.qm" file (if there is one) which contains translations for most of the built-in GUI elements. HTH, Bob -- On

[Interest] Embedding language translation as resource

2021-04-26 Thread Nicholas Yue
Hi, I am trying to embed translation file as a resource but when I run the compiled program, it fails to load the translation ERROR: Translation failure to load main.cpp *** #include #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv);