Linguist in a Shared Library
-
I'm developing a main Qt C++ application and a set of C++
plugins
(shared libraries
) for this same application.The main application have a
Linguist
feature usingQTranslator
to enable the final user changes the UI language.First question:
Is there a way to, when the user change the Main App language, all plugins receive a signal and change his own internal languages too simultaneously?Second question:
If this is possible, how can I check if the user selected language in the Main App exists inside each plugin?
I said it because, if the main app language doesn't exist inside some plugin, this plugin should be load a "default" language.My system:
- Qt Creator 4.12.4
- Qt 5.15
-
@fem_dev said in Linguist in a Shared Library:
change his own internal languages too simultaneously?
See documentation of QTranslator / QCoreApplication::installTranslator()
inside each plugin?
No, but you can write a plugin function where you can ask every plugin about this.
-
@fem_dev said in Linguist in a Shared Library:
change his own internal languages too simultaneously?
See documentation of QTranslator / QCoreApplication::installTranslator()
inside each plugin?
No, but you can write a plugin function where you can ask every plugin about this.
@Christian-Ehrlicher perfect! Thank you!