09-21-2013 12:45 PM
How localize images?.
In qml I get the images some like this: imageSource: "asset:///images/bot-N-3.png"
I dont understard your question very well
09-21-2013 01:00 PM
I have made this questions one week ago , maybe this will serve you
09-21-2013 01:11 PM
what I meant is that perhaps will serve to translate texts deserts instead of changing pictures.
put the text above the image, and would occupy less memory space
09-21-2013 01:18 PM
I don't have text to put above the image. I have different images for different languages. Imagine as a simple example an app where the US/UK version has red, white and blue graphics, and the German and Belgian version use images in red, yellow and black.
09-22-2013 02:14 PM
I wasn't going to read yet another thread about localization, but I'm glad I did. Definitely a very cool trick. Triple "like" if I could.
Aha, so the way to do it is to provide "translations" of the filename? Nice trick.
09-22-2013 02:35 PM
Well, to tell you some more "secrets", the source of my translations is a 2-dimensional CSV file, with strings running vertically, and languages running horizontally, and a simple AWK script which creates the .strings files for iOS and the .ts files for BB10.
09-22-2013 02:40 PM
And instead of providing "translating" for *all* files, you can define tr("kLoc_lang") as "en" for English and "es" for Spanish, and then use QString::arg() to "paste" the language in each filename you need.