runtime translation of strings

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
AndreaB
Posts: 4
Joined: Wed Aug 22, 2007 1:04 pm

runtime translation of strings

Post by AndreaB »

sorry, but is there a simple way to take advantage of translated strings stored in sib file (i load it ad runtime) to dynamically traslate a string ?

I try to explain better:

in hundreds of point in my source code I generated message that I stored in my database in an EventLog table.
I defined a function that receive stings to store in the database table.
In the table I want to both native language (italian) description and current language description (this is to allow me to undestand what is happend, for instance, in a greek installation of my software).

so I have several points of the type

Somestring:= silang.gettextordefault(IDS_.....);
AddLog(SomeString);


In function AddLog i want to get back the native language string corresponding to IDS_.... to store in the table both descriptions.

How can I do ?

thanks for the help
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

You can try the following:

SomeString := siLang1.GetStringValue(siLang1.Strings, 'IDS_...', INDEX_OF_ITALIAN);
Best regards,
Igor Siticov.
Post Reply