SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with a datamodule

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
Alejandro Castro



Joined: 21 Apr 2003
Posts: 1

PostPosted: Mon Apr 21, 2003 4:34 am    Post subject: Problem with a datamodule Reply with quote

Hi

I have used the Component with excellents results but now I have a problem

I have a datamodule, the datamodule contains several strings that I want to convert on several languages

I did the usual, I run the TsiLang Expert, extract the strings, assign the ID numbers (from 101 to 120), I translate the strings but my problem is that there are several strings that I cant see. For example on the next code:

xMens:=siLangRT1.GetTextOrDefault('IDS_103' (* 'Enviando correo ' *) );
showmessage(xMens);

The string xMens is always empty (blank), I review the code, the IDs, remove the component and I have repeated the process for several times, I edit the SIL file, etc, etc, etc

My question: Why ? What can I do ?

Thanks in advance
Alejandro
Back to top
View user's profile Send private message Visit poster's website
gaivans



Joined: 29 Nov 2002
Posts: 71

PostPosted: Mon Apr 21, 2003 7:12 am    Post subject: Reply with quote

Hello,

It seems that TsiLangRT component does not contain any strings translations at the moment when you call "ShowMessage". The possible reasons might be:
1) Translations data are stored in an external file but the property "LoadOnCreate" of the TsiLangRt is not set to "True". Thus, that .sil file is not loaded.
2) Make sure the property "StorageFile" of the component points to the proper file name.
3) It might be that you have on the main form a siLangRT1, too. So, if you use the above code from the main form, then the compiler calls method GetTextOrDefault of the main form's siLangRT1. To avoid such problem you can check the "Add form name" option of the TsiLangExpert ("Tools|Options...|Strings in source"). Then your code will look like this:
xMens:=DataModule1.siLangRT1.GetTextOrDefault('IDS_103' (* 'Enviando correo ' *) );
That is, the ambiguty will be eliminated.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group