openPilotLog
|
The ATranslator class is responsible for managing the QTranslator used for providing localisations. Translations are planned, but are not currently being worked on. The way QT language tools are working with CMAKE, there are some considerations for when works on translation actually start. See here and here. Long story short, make sure to use a version of CMake that is 3.16 or earlier, or 3.19.2 or later. More...
#include <translator.h>
Static Public Member Functions | |
static void | installTranslator (OPL::Translation language=OPL::Translation::English) |
Installs a QTranslator with the selected language. Defaults to English. Call this function before constructing the Main Window. | |
The ATranslator class is responsible for managing the QTranslator used for providing localisations. Translations are planned, but are not currently being worked on. The way QT language tools are working with CMAKE, there are some considerations for when works on translation actually start. See here and here. Long story short, make sure to use a version of CMake that is 3.16 or earlier, or 3.19.2 or later.
The translation source files (.ts) are located at /l10n and once compiled, the translation binaries are at $BINDIR/l10n/
and can be accessed via OPL::L10N_FILES
.
When a QTranslator is installed, the UI is updated through QWidget::changeEvent().