![]() |
Dynamic text translations in pure QML
Posted a blog about it and thought it should also be published here.
Basically it deals with translating texts and also allow a QML event to change the language - all in pure QML. If you'd like to see the code in a formatted form, it is available: translator.js Translator.qml QwazerSettings.qml qwazer.qml qwazer.he.js Edit: I forgot to mention that I added a bash script that scans the qml files and create new translations file (similar to lupdate) as a comment at the beginning of translator.js. |
Re: Dynamic text translations in pure QML
Interesting approach. :) My only concern would be that it makes it more difficult for users to provide translations (unless the developer takes all the translated strings from the .ts file provided by the translator and puts them into a JS object, which again equals more work). I suppose you could write a script that automates that process. :)
|
Re: Dynamic text translations in pure QML
Quote:
|
All times are GMT. The time now is 16:35. |
vBulletin® Version 3.8.8