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
Developer
Posts: 125
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
My Carrier: none
Accepted Solution

localization

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

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

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
Developer
Posts: 125
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
My Carrier: none

Re: localization

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

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

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
Developer
Posts: 125
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
My Carrier: none

Re: localization

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

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

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
Developer
Posts: 125
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
My Carrier: none

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
Posts: 1,028
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

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.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Developer
Posts: 125
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
My Carrier: none

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.

Developer
Posts: 125
Registered: ‎06-19-2012
My Device: PlayBook + Red Z10 + BB10 Dev Alpha C
My Carrier: none

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.