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: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon
Accepted Solution

Translations example

I am trying to do translations in Cascades the 'proper' way but can not actually find any multi-ligual app examples. I am fairly sure that it is a simple as filling out the AppName.ts file with the appropriate translations, but I am not quite sure what the format is supposed to look like (and a little worried as it appears to be an automatically generated file).

 

Does any one have an example of this in action?


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: Translations example

[ Edited ]

There are several examples on GitHub with QML, but I uploaded an example (attached here) in c++.

 

Be forewarned that if you're using c++ with East Asian languages (Chinese, Japanese and Korean) that it's currently broken.  You can only use those languages directly in source code (not ts files) or from database/other files.

 

If you load East Asian languages from ts files for use in QML you should be okay.

Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: Translations example

The sample in my signature also uses localization for Dutch and English, so you can check that as well.

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Developer
Posts: 1,667
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Translations example


Ebscer wrote:

I am trying to do translations in Cascades the 'proper' way but can not actually find any multi-ligual app examples. I am fairly sure that it is a simple as filling out the AppName.ts file with the appropriate translations, but I am not quite sure what the format is supposed to look like (and a little worried as it appears to be an automatically generated file).

 

Does any one have an example of this in action?


You should download and use QtLinguist - much easier then editin the .ts files itself

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: Translations example

My localization steps:

 

Create the app.

Add tr("my text") anywhere there is a localized string.

Add supported languages in the bar file.

Clean the project (so it will generate new ts files).

 

Two options from this point:

1. Manually edit the ts files:

    Add text to translation tags.

    Remove unfinished text, should look like <translation>my text</translation>

2. Use QtLinguist as mentioned by Ekke

 

Then clean and build again.

 

One thing to keep in mind; screen shots on the vendor portal are not localized.

Title, short description, long description and keywords are.