In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Using SetLanguage

Xailer professional forum in English
Responder
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

Hi,
studying the RichPad sample I've found two functions used to retrieve
language strings.
LT()
LT2()
What is the difference between them ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Using SetLanguage

Mensaje por ignacio »

Giussepe,
LT2() takes off the '&'.
Regards,
"Giuseppe Bogetti" <bgsoft@tiscali.it> escribió en el mensaje
news:lfpwla99oeg3$[email=.ojr3gi0psyyh.dlg@40tude.net...].ojr3gi0psyyh.dlg@40tude.net...[/email]
> Hi,
>
> studying the RichPad sample I've found two functions used to retrieve
> language strings.
> LT()
> LT2()
>
> What is the difference between them ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
InvalidAccount
Mensajes: 53
Registrado: Vie Mar 04, 2005 9:58 am

Using SetLanguage

Mensaje por InvalidAccount »

Giussepe,
LT2() takes off the '&'.
Regards,
"Giuseppe Bogetti" <bgsoft@tiscali.it> escribió en el mensaje
news:lfpwla99oeg3$[email=.ojr3gi0psyyh.dlg@40tude.net...].ojr3gi0psyyh.dlg@40tude.net...[/email]
> Hi,
>
> studying the RichPad sample I've found two functions used to retrieve
> language strings.
> LT()
> LT2()
>
> What is the difference between them ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Using SetLanguage

Mensaje por jfgimenez »

Giuseppe,
> studying the RichPad sample I've found two functions used to retrieve
> language strings.
> LT()
> LT2()
>
> What is the difference between them ?
LT2() removes all "&" characters from the string. However, if you need to
show an ampersand in a string, just type it twice: "&&".
It's usefull, i.e., when using the same string for a menuitem and a form
title.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Using SetLanguage

Mensaje por jfgimenez »

Giuseppe,
> studying the RichPad sample I've found two functions used to retrieve
> language strings.
> LT()
> LT2()
>
> What is the difference between them ?
LT2() removes all "&" characters from the string. However, if you need to
show an ampersand in a string, just type it twice: "&&".
It's usefull, i.e., when using the same string for a menuitem and a form
title.
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

In data Tue, 15 Mar 2005 12:31:15 +0100, Ignacio Ortiz de Zúñiga ha
scritto:
Ignacio,
> LT2() takes off the '&'.
>
> Regards,
Thanks
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

In data Tue, 15 Mar 2005 12:31:15 +0100, Ignacio Ortiz de Zúñiga ha
scritto:
Ignacio,
> LT2() takes off the '&'.
>
> Regards,
Thanks
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

In data Tue, 15 Mar 2005 12:31:39 +0100, Jose F. Gimenez ha scritto:
Jose,
> LT2() removes all "&" characters from the string. However, if you need to
> show an ampersand in a string, just type it twice: "&&".
>
> It's usefull, i.e., when using the same string for a menuitem and a form
> title.
Thanks.
I've also noticed that in some cases extra parameters are sent for an
"inline" replacement into string.
Do I have to call this parameters %1, %2 .... %n into the string to be
processed ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

In data Tue, 15 Mar 2005 12:31:39 +0100, Jose F. Gimenez ha scritto:
Jose,
> LT2() removes all "&" characters from the string. However, if you need to
> show an ampersand in a string, just type it twice: "&&".
>
> It's usefull, i.e., when using the same string for a menuitem and a form
> title.
Thanks.
I've also noticed that in some cases extra parameters are sent for an
"inline" replacement into string.
Do I have to call this parameters %1, %2 .... %n into the string to be
processed ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Using SetLanguage

Mensaje por jfgimenez »

Giuseppe,
> I've also noticed that in some cases extra parameters are sent for an
> "inline" replacement into string.
>
> Do I have to call this parameters %1, %2 .... %n into the string to be
> processed ?
Yes. You can use %1, %2, etc. in the string, and call LT() passing the
string and other strings to be replaced. I.e:
- The resource string is: "Error: %1 in module %2, line %3"
- Call it as: LT( MY_STRING, "Some error", ProcName(), LTrim( Str(
ProcLine() ) ) )
It's similar, but limited, to printf() in C
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Using SetLanguage

Mensaje por jfgimenez »

Giuseppe,
> I've also noticed that in some cases extra parameters are sent for an
> "inline" replacement into string.
>
> Do I have to call this parameters %1, %2 .... %n into the string to be
> processed ?
Yes. You can use %1, %2, etc. in the string, and call LT() passing the
string and other strings to be replaced. I.e:
- The resource string is: "Error: %1 in module %2, line %3"
- Call it as: LT( MY_STRING, "Some error", ProcName(), LTrim( Str(
ProcLine() ) ) )
It's similar, but limited, to printf() in C
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

In data Tue, 15 Mar 2005 12:51:32 +0100, Jose F. Gimenez ha scritto:
Jose,
> Yes. You can use %1, %2, etc. in the string, and call LT() passing the
> string and other strings to be replaced. I.e:
>
> - The resource string is: "Error: %1 in module %2, line %3"
>
> - Call it as: LT( MY_STRING, "Some error", ProcName(), LTrim( Str(
> ProcLine() ) ) )
>
> It's similar, but limited, to printf() in C
Thanks
Is there a function which let me know the supported languages linked to an
application (i.e. the stringtables defined ) ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Giuseppe Bogetti
Mensajes: 281
Registrado: Vie Ago 04, 2006 4:58 pm

Using SetLanguage

Mensaje por Giuseppe Bogetti »

In data Tue, 15 Mar 2005 12:51:32 +0100, Jose F. Gimenez ha scritto:
Jose,
> Yes. You can use %1, %2, etc. in the string, and call LT() passing the
> string and other strings to be replaced. I.e:
>
> - The resource string is: "Error: %1 in module %2, line %3"
>
> - Call it as: LT( MY_STRING, "Some error", ProcName(), LTrim( Str(
> ProcLine() ) ) )
>
> It's similar, but limited, to printf() in C
Thanks
Is there a function which let me know the supported languages linked to an
application (i.e. the stringtables defined ) ?
--
Best regards,
Giuseppe Bogetti
B.G. Soft
Cuneo - Italy
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9246
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Using SetLanguage

Mensaje por ignacio »

Giuseppe,
GetLanguages()
Antother functions:
GetWindowsLanguage()-> nLanguage
SetLanguage( nLanguageID )
Regards,
"Giuseppe Bogetti" <bgsoft@tiscali.it> escribió en el mensaje
news:1bdy7v3kvl43q.35evkv4d22ye$[email=.dlg@40tude.net...].dlg@40tude.net...[/email]
> In data Tue, 15 Mar 2005 12:51:32 +0100, Jose F. Gimenez ha scritto:
>
> Jose,
>> Yes. You can use %1, %2, etc. in the string, and call LT() passing the
>> string and other strings to be replaced. I.e:
>>
>> - The resource string is: "Error: %1 in module %2, line %3"
>>
>> - Call it as: LT( MY_STRING, "Some error", ProcName(), LTrim( Str(
>> ProcLine() ) ) )
>>
>> It's similar, but limited, to printf() in C
> Thanks
>
> Is there a function which let me know the supported languages linked to an
> application (i.e. the stringtables defined ) ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
InvalidAccount
Mensajes: 53
Registrado: Vie Mar 04, 2005 9:58 am

Using SetLanguage

Mensaje por InvalidAccount »

Giuseppe,
GetLanguages()
Antother functions:
GetWindowsLanguage()-> nLanguage
SetLanguage( nLanguageID )
Regards,
"Giuseppe Bogetti" <bgsoft@tiscali.it> escribió en el mensaje
news:1bdy7v3kvl43q.35evkv4d22ye$[email=.dlg@40tude.net...].dlg@40tude.net...[/email]
> In data Tue, 15 Mar 2005 12:51:32 +0100, Jose F. Gimenez ha scritto:
>
> Jose,
>> Yes. You can use %1, %2, etc. in the string, and call LT() passing the
>> string and other strings to be replaced. I.e:
>>
>> - The resource string is: "Error: %1 in module %2, line %3"
>>
>> - Call it as: LT( MY_STRING, "Some error", ProcName(), LTrim( Str(
>> ProcLine() ) ) )
>>
>> It's similar, but limited, to printf() in C
> Thanks
>
> Is there a function which let me know the supported languages linked to an
> application (i.e. the stringtables defined ) ?
>
> --
> Best regards,
>
> Giuseppe Bogetti
> B.G. Soft
> Cuneo - Italy
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Using SetLanguage

Mensaje por jfgimenez »

Giuseppe,
> Is there a function which let me know the supported languages linked to an
> application (i.e. the stringtables defined ) ?
GetLanguages() returns a bi-dimensional array. Each element is { nIdLang,
nLangName }.
But you must create a specific stringtable with the languages supported by
your app. I.e:
STRINGTABLE LANGUAGE 0,0
{
3 "Català"
7 "Deutsch"
9 "English"
10 "Español"
12 "Français"
16 "Italiano"
22 "Portuguese (Portugal)"
86 "Galego"
}
Then, you have to write the stringtables for each language supported. I.e:
#define MENU_FILE 1001
#define MENU_NEW 1002
#define MENU_FORM 1003
....
STRINGTABLE LANGUAGE 10, 0 ; Spanish
{
MENU_FILE "&Archivo"
MENU_NEW "&Nuevo"
MENU_FORM "&Formulario"
....
}
STRINGTABLE LANGUAGE 16, 0 ; Italian
{
MENU_FILE "&File"
MENU_NEW "&Nuovo"
MENU_FORM "&Form"
....
}
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Using SetLanguage

Mensaje por jfgimenez »

Giuseppe,
> Is there a function which let me know the supported languages linked to an
> application (i.e. the stringtables defined ) ?
GetLanguages() returns a bi-dimensional array. Each element is { nIdLang,
nLangName }.
But you must create a specific stringtable with the languages supported by
your app. I.e:
STRINGTABLE LANGUAGE 0,0
{
3 "Català"
7 "Deutsch"
9 "English"
10 "Español"
12 "Français"
16 "Italiano"
22 "Portuguese (Portugal)"
86 "Galego"
}
Then, you have to write the stringtables for each language supported. I.e:
#define MENU_FILE 1001
#define MENU_NEW 1002
#define MENU_FORM 1003
....
STRINGTABLE LANGUAGE 10, 0 ; Spanish
{
MENU_FILE "&Archivo"
MENU_NEW "&Nuevo"
MENU_FORM "&Formulario"
....
}
STRINGTABLE LANGUAGE 16, 0 ; Italian
{
MENU_FILE "&File"
MENU_NEW "&Nuovo"
MENU_FORM "&Form"
....
}
--
Regards,
Jose F. Gimenez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder