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 

Multiline string question

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



Joined: 11 Jan 2010
Posts: 4

PostPosted: Fri Jan 15, 2010 11:32 am    Post subject: Multiline string question Reply with quote

WebApplication->ShowMessage("Line1\nLine2"); shows a message box with two lines.
WebApplication->ShowMessage(siLangLinked1->GetTextOrDefaultC(IDS_10)); with exactly the same text in IDS_10 in the Translation Editor shows a message box with one line "Line1\nLine2".

How do I have to define my string or a setup to get two lines?

C.N.Taur
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Mon Jan 18, 2010 4:15 pm    Post subject: Reply with quote

Just set UsedInCPP field of TsiLang to True.
Hope this helps.
Back to top
View user's profile Send private message
optiware



Joined: 11 Jan 2010
Posts: 4

PostPosted: Fri Jan 22, 2010 7:45 am    Post subject: Reply with quote

Where do I find UsedInCPP?
I have a common LangDispatcher and a siLangLinked on each form.

Under 'Translation Settings' I found 'Parse multi-lines' (unchecked). Has it do do with this problem?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Fri Jan 22, 2010 10:22 am    Post subject: Reply with quote

Code:
siLangLinked1->UsedInCPP = true;


UsedInCPP is a public field of TsiLang components.
Back to top
View user's profile Send private message
optiware



Joined: 11 Jan 2010
Posts: 4

PostPosted: Fri Jan 22, 2010 2:53 pm    Post subject: Reply with quote

It worked. Thank you.
I did not know this property.
siLangDispatcher doesn't have it? Global setup would be nice.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2095

PostPosted: Fri Jan 22, 2010 4:35 pm    Post subject: Reply with quote

In Application's initialization code just add

siLang_Def_UsedInCpp = true;

P.S. siLang_Def_UsedInCpp is declared in siComp.hpp.

P.P.S. http://www.tsilang.com/delphiglobalizationtool_faq.html#23 Wink
Back to top
View user's profile Send private message
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