PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB19] Translation of a button caption
[WB19] Translation of a button caption
Iniciado por guest, 06,may. 2015 13:59 - 3 respuestas
Publicado el 06,mayo 2015 - 13:59
Hello,

In my project there are 4 languages defined.
I have a button on a dynamic page. In the description of the button, tab GUI, I set the type of the button = "Dynamic". I also defined the caption for my 4 languages.

Problem is that the caption at run time does not change according to the selected language.

If I change the type of the button to "Automatic", the caption thing is working OK, but than I have some other problems.

I can't find in the help what this button type property actually does. Any ideas ?

Thx,
Bart
Publicado el 06,mayo 2015 - 14:16
Hi.

Do something like this.:
in the ini code of page or button

lnguageID is int // Problebly globally availeble

Switch languageID

case 1
mybutton..caption = "caption 1"
case 2
mybutton..caption = "caption 2"

end

Regards
Allard
Publicado el 06,mayo 2015 - 16:48
Hi Allard,

Thanks for your suggestion, but I want to use the Nation() function to change the language of my UI, and not assign in code the translation for all my controls.

Regards,
Bart
Publicado el 06,mayo 2015 - 17:05
Hi Bart,

AWP or Classic Dynamic?
In case of AWP you need to manage the subdirectory yourself and test for the language passed (via the url e.g.) in the project init code.
In Dynamic, Nation() should do the trick. Just not sure if you need to do it in the init code of the project or at page level?

Cheers,

Peter H.