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
Super Contributor
Posts: 398
Registered: ‎01-12-2011
My Device: Q10
My Carrier: Fido

Translations not showing.

[ Edited ]

Hi,

 

I have a project with a translations folder, and I use the following code to show a localizable string:

 

QObject::tr("hello_label")

 

This works fine in this project.

 

I duplicated this project and now the translations no longer show, the actual name of the label shows on the app not it's content (ex: instead of Bonjour it shows hello_label), this goes for all of my translations.

 

I compared all files of this project to the old project and everything is the same. What could have happened?


Thanks!

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Translations not showing.

Stupid question but you are definately in the right language on your phone right?

 

If so are you sure you copied the translation code in applicationui across and have actually translated the files?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Super Contributor
Posts: 398
Registered: ‎01-12-2011
My Device: Q10
My Carrier: Fido

Re: Translations not showing.

Yes, I even tried renaming the new app and having both the old and new on my phone at the same time and only the old one were showing translations properly.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Translations not showing.

Are they build to the same version of the OS (I'm reaching now)?

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Super Contributor
Posts: 398
Registered: ‎01-12-2011
My Device: Q10
My Carrier: Fido

Re: Translations not showing.

Yes same version.

Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

Re: Translations not showing.

do you have any qml files not directly in the assets folder (in subfolders etc?)

 

if so including them should fix the issue

 

.pro

lupdate_inclusion {
SOURCES += ../assets/Components/*.qml
}
lupdate_inclusion {
SOURCES += ../assets/OtherFiles/*.qml
}

 If that isn't the issue, have you included all the supported languages in the Localization tab of the bar descriptor?

 

... those are really the only 2 things I can think of that would cause it not to work.  If the issue still persists possibly creating a new project and migrating your code over could solve it.

Highlighted
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Translations not showing.

Also check the pro and makefile withtin the translations.

 

In all likelihood starting a new project would just exhibit the same results so get your hands on a file diff app and see where the differences really are.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.