Forum Topic - ApSetTranslation() ignores language regionalization: (3 Items)
   
ApSetTranslation() ignores language regionalization  
Hi folks,
I have a Photon GUI running QNX OS 6.4.1. I use the QNX Translation mechanism for different languages.
During application initialization I use this command to initialize the language of my GUI:

int res = ApSetTranslation("de_DE")     // for German language in Germany.

This returns 0 for success and loads the language file from the set path of ABLPATH=/usr/photon/translations which 
results in the file path of:
ABLPATH=/usr/photon/translations/myapplication.de_DE

This mechanism works fine with several languages, as long as I don't seperate between regional versions of one language.
 As soon as I try to seperate between "de_DE" and "de_CH" I always get the return value "0" for success, but the 
language file "de_DE" is always loaded.

Example: I have the language files: "myapplication.de_DE" and "myapplication.de_CH". In this case with ApSetTranslation(
"de_CH") still the "de_DE" language file is loaded.

But if I delete the "de_DE" file from harddrive, the application loads "de_CH" instead. The same behaviour was verified 
using "fr_FR" and "fr_CA".

I assume there must be something going wrong with the best  match algorithm described here in the documentation, 
unfortunately I can't find out what.
http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html#RunningYourApplication

So if anybody has a great idea how to solve this mystery your help is really appreciated!!
Thanks and Greetings,
Martin H.
Re: ApSetTranslation() ignores language regionalization  
            Hi, Martin.

I have reproduced this behavior in QNX 6.4.1. But in QNX 6.5.0 algorithm working as intended.

Regards, 
Alexander.

> Hi folks,
> I have a Photon GUI running QNX OS 6.4.1. I use the QNX Translation mechanism 
> for different languages.
> During application initialization I use this command to initialize the 
> language of my GUI:
> 
> int res = ApSetTranslation("de_DE")     // for German language in Germany.
> 
> This returns 0 for success and loads the language file from the set path of 
> ABLPATH=/usr/photon/translations which results in the file path of:
> ABLPATH=/usr/photon/translations/myapplication.de_DE
> 
> This mechanism works fine with several languages, as long as I don't seperate 
> between regional versions of one language. As soon as I try to seperate 
> between "de_DE" and "de_CH" I always get the return value "0" for success, but
>  the language file "de_DE" is always loaded.
> 
> Example: I have the language files: "myapplication.de_DE" and "myapplication.
> de_CH". In this case with ApSetTranslation("de_CH") still the "de_DE" language
>  file is loaded.
> 
> But if I delete the "de_DE" file from harddrive, the application loads "de_CH"
>  instead. The same behaviour was verified using "fr_FR" and "fr_CA".
> 
> I assume there must be something going wrong with the best  match algorithm 
> described here in the documentation, unfortunately I can't find out what.
> http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/languages.html#
> RunningYourApplication
> 
> So if anybody has a great idea how to solve this mystery your help is really 
> appreciated!!
> Thanks and Greetings,
> Martin H.


Re: ApSetTranslation() ignores language regionalization  
Hi Alex,
thanks for verifying this bug. 
Greetings, Martin