Page 1 of 1

Multiline string question

Posted: Fri Jan 15, 2010 11:32 am
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

Posted: Mon Jan 18, 2010 4:15 pm
by isiticov
Just set UsedInCPP field of TsiLang to True.
Hope this helps.

Posted: Fri Jan 22, 2010 7:45 am
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?

Posted: Fri Jan 22, 2010 10:22 am
by isiticov

Code: Select all

siLangLinked1->UsedInCPP = true;
UsedInCPP is a public field of TsiLang components.

Posted: Fri Jan 22, 2010 2:53 pm
by optiware
It worked. Thank you.
I did not know this property.
siLangDispatcher doesn't have it? Global setup would be nice.

Posted: Fri Jan 22, 2010 4:35 pm
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: