04-25-2013 09:40 AM - edited 04-25-2013 09:51 AM
I am really interested to hear your guys opinion on the following.
What is the best way to handle your text in BB10 apps if you are building a whitelable app?
I built an app that uses QML for the UI and handles all the business logic and data handling through C++.
At the moment when I am setting my texts in QML I am using qsTr("something").
So my question being. If I want to make a whitelable app and I wanna be able to quickly change the Text.
Is there any sexy solution in BB10 something like Android does (String.xml)or something similar that early BB dev did? or a key value pair solution where I just grab the key I am after I am think of something like the following
so that way I can edit my text in one doc instead of screening through all the UI elements I built.
Any Ideas? Or could I just store them in a JS file or in a raw txt or is there any more elegant solution?
I am keen to hear your guys thoughts.
04-26-2013 04:09 AM
Have you looked into Cascades localiztion APIs? You can essentially store all your text in translation files and load them on the fly. I don't know if this will exactly address your use case but definitely worth a look:
04-26-2013 10:04 AM
Cheers for the tip. It should do this already as I did set up a project initially like this. However .ts does not get populated with content on build. Any ideas?
I've tried force it with lupdate command. I looks generates all the locals, but something automaticlly get rid of after a 2 of sec. I dont even have the time to save it. hmmmm very strange. Any idea?