After several weeks of on-off-off research, I still have not found a detailed guide on how to translate / localize in QtQuick (as in the case of using QML, not C ++ or Python).
In general, I ask what are the steps to properly localize a project, as much as possible in QtQuick, with minimal or preferably missing C ++.
In particular, there are a large number of holes that I need to fill in my understanding of how QtQuick handles localization.
So far I:
Added QT_TR_NOOP () to all my translation strings for translation at runtime
Added my file containing all the lines to my .pro file using lupdate_only {SOURCES + = LanguageStrings.qml}
Generated Translation Files Using QtLinguist
However, I intend to implement an option for dynamically changing the language, and the only example I saw regarding a translation that was not completely in C ++ essentially created an instance of the project for each language, rather than changing lines at runtime.
So how do I change the language at runtime? Is there a variable that I can set? Is it extracted from the system locale? I did not see a solid answer to this question.
Any ideas?
NGXII source
share