Page 1 of 1

How to translate an include file

Posted: Mon Jul 18, 2005 9:08 am
by StefanP
Hi,

I have a third-party library that uses an INC file to declare some common strings. How do I translate that with TsiLang?

I tried adding the file to the project and then "File/Const Section/Without Form..." from the TsiLang Expert but the following dialog ("Translating units without form") does not show my INC file.

I also tried to add one of the PAS files using the INC file to my project. But only the strings contained directly in the pas file show up for translation. The include file is not scanned for translatable strings. To be honest I did not expect this approach to work.

What to do?

Best regards

Posted: Mon Jul 18, 2005 9:21 am
by isiticov
Hello,

Are these strings in INC file declared as VAR/CONST or as resourcestring?
In case they are declared as resource strings then you can use "resource handling" for translate them.

Posted: Mon Jul 18, 2005 9:34 am
by StefanP
isiticov wrote:Hello,

Are these strings in INC file declared as VAR/CONST or as resourcestring?
In case they are declared as resource strings then you can use "resource handling" for translate them.
The strings are indeed defined in a resource string section. I will try what you suggest and come back to you if I need further help.

Thanks so far

Posted: Mon Jul 18, 2005 11:11 am
by StefanP
isiticov wrote:Hello,

Are these strings in INC file declared as VAR/CONST or as resourcestring?
In case they are declared as resource strings then you can use "resource handling" for translate them.
OK, that works. One thing though. During the use of the Reource strings wizard I got an error message telling me that the OnChangeLanguage property was not valid. Something like that. But, as said before everything works and the event is assigned to a valid event handler.

Thanks again for your prompt support