[Gambas-user] String Translate

craf prog at ...2177...
Tue Jul 6 19:13:09 CEST 2010


-----Mensaje original-----
De: Benoît Minisini <gambas at ...1...>
Reply-to: mailing list for gambas users
<gambas-user at lists.sourceforge.net>
Para: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Asunto: Re: [Gambas-user] String Translate
Fecha: Tue, 6 Jul 2010 19:06:15 +0200


> Hi.
> 
> I wonder if it is possible to translate strings enclosed in a module,
> which will be used in two different forms. The point is:
> 
> 1. Creation of two forms (Form1 and FMain).
> 
> 2. Creating a button on each form.
> 
> 3. Creation of a string constant in a module (Module1).
> 
> 4. Constant translation into English.
> 
> All this in my code looks like this:
> 
> 'Code in FMain
> 
> PUBLIC SUB Form_Open()
> 
>     System.Language = "en_US.UTF-8"
>     Button1.Caption = texto
> 
> END
> 
> 'Code in Form1
> 
> PUBLIC SUB Form_Open()
> 
>     Button1.Caption = FMain.texto
> 
> END
> 
> 'Code in Module1
> 
> PUBLIC CONST texto AS String = ("Añadir")
> 
> 
> 
> Is there any way to translate strings that are stored in a module, this
> with the reason of not having to repeat each string on each form.
> 
> Regards.

>You can do that, of course, but what for? The same string used multiple times 
>in different classes/modules/forms... will be translated once in the 
>translation dialog.


Ok. I got it.

Thank you very much

Regards




More information about the User mailing list