|
|
2011-07-02
, 21:30
|
|
|
Posts: 2,448 |
Thanked: 9,523 times |
Joined on Aug 2010
@ Wigan, UK
|
#2
|
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.
|
|
2011-07-03
, 05:26
|
|
Posts: 329 |
Thanked: 505 times |
Joined on Jul 2008
@ Israel
|
#3
|
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.
Last edited by damagedspline; 2011-07-02 at 21:18. Reason: Utility script