Multiline string question

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
optiware
Posts: 4
Joined: Mon Jan 11, 2010 2:31 pm

Multiline string question

Post by optiware »

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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Just set UsedInCPP field of TsiLang to True.
Hope this helps.
Best regards,
Igor Siticov.
optiware
Posts: 4
Joined: Mon Jan 11, 2010 2:31 pm

Post by optiware »

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?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Code: Select all

siLangLinked1->UsedInCPP = true;
UsedInCPP is a public field of TsiLang components.
Best regards,
Igor Siticov.
optiware
Posts: 4
Joined: Mon Jan 11, 2010 2:31 pm

Post by optiware »

It worked. Thank you.
I did not know this property.
siLangDispatcher doesn't have it? Global setup would be nice.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

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/delphiglobalizat ... aq.html#23 :wink:
Best regards,
Igor Siticov.
Post Reply