Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
Accepted Solution

localization

How do I localize images? It there some required directory structure, or should I edit the bar descriptor?

Developer
matizeitune
Posts: 366
Registered: ‎07-15-2013
My Device: blackberry Z10

Re: localization

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

If you find this information useful please click like --->
@mezeitune on twitter
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: localization

I want to support several languages, and load a different image for each language.

Developer
matizeitune
Posts: 366
Registered: ‎07-15-2013
My Device: blackberry Z10

Re: localization

I have made this questions one week ago , maybe this will serve you

http://supportforums.blackberry.com/t5/Native-Development/How-to-translate-between-languages/td-p/25...

If you find this information useful please click like --->
@mezeitune on twitter
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: localization

Aha, so the way to do it is to provide "translations" of the filename? Nice trick. :smileyhappy:

Developer
matizeitune
Posts: 366
Registered: ‎07-15-2013
My Device: blackberry Z10

Re: localization

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

If you find this information useful please click like --->
@mezeitune on twitter
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: localization

deserts?

 

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.

Developer
greenmr
Posts: 911
Registered: ‎03-20-2013
My Device: Red LE Developer Z10

Re: localization

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.

 


marcelnijman wrote:

Aha, so the way to do it is to provide "translations" of the filename? Nice trick. :smileyhappy:






Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: localization

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.

Trusted Contributor
marcelnijman
Posts: 118
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C

Re: localization

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.