Page 1 of 1

3rd party messagedlg...

Posted: Tue Oct 03, 2006 6:12 pm
by tazthedev
Hi,

I tried many things showed in the forum about the MessageDlg translations..

they worked, but not for everything...

if SkinMessage.MessageDlg(siLang1.GetTextOrDefault('ID2'),mtInformation,[mbyes,mbno],0) = mryes then begin

ID2 works fine for the message...
But it cant work for the caption button...

[mbyes, mbno] .....

I tried to get the ressource id from the wizard, and i get results...

IDS_RES_65209 ..... &No ........ &Non
IDS_RES_65208 ..... &Yes ........ &Oui...

But how can i use them to let Delphi knows that their mbyes is a IDS_RES... ?!? If i try with GetText or GetTextOrDefault... it gives me error... Ordinal Type required...

Im lost...

Posted: Wed Oct 04, 2006 5:18 am
by isiticov
Hi,

If you used Resource Strings Wizard and imported needed strings then just check that TsiLang has HandleResourceStrings = True.
In such case you don't need to modify SkinMessage.MessageDlg() call. If it uses loading of resource strings form button captions then it must work just fine. If button captions still not translated (with HandleResourceStrings = True) then it looks like SkinMessage.MessageDlg() doesn't use resource strings but uses hard-coded string constants and this is very bad way.
Please let me know if this helps.

Posted: Wed Oct 04, 2006 2:37 pm
by tazthedev
Unfortunately, its not working. :(

Is there another way to make it works ?

Or maybe i could simply use skinned form to act like a MessageDlg. So the buttons on the form will be translated without any problems. ..

But i will have the same problems with the skinned Open Dialogs (Almediadev Components set). I wont be able to translate their buttons..

Maybe their 3rd party SkinAdapter will work with your siOpenDialogs...

hmm... i even tried with 1 of your demos.. I simply used the common delphi function MessageDlg() ... and i cannot change their caption buttons !!!! why ?!? Just try it. Use a simple form, on form click
call this.... messagedlg(..... needed parameters...) ...

I cannot translate the caption buttons :s

helps.

thx

Posted: Wed Oct 04, 2006 4:08 pm
by isiticov
At http://www.sicomponents.com/soft/demos/ ... ources.zip is placed demo that demonstrates translation of Delphi's MessageDlg using resources as well as displaying multilanguage MessageDlg() using TsiLang's MessageDlg() method.
Please let me know if it works on your side.

Posted: Thu Oct 05, 2006 3:32 am
by tazthedev
hmm... geez...

i got a newer version of your component. the last version i got was 6.0.2 instead of 5.3 ... and now, when i open a previous project made with version 5.3, i got an error when i try this code...

siLang1.activelanguage := 2 ; // English

Error..... EOleException .... Error not specified...

Language 2 is working in desing time, but not when selected in runtime..

WHY ??

Oh, and, if i start a new project, there's no problem. And if im using VCLSkin instead of BusinessSkinForm, the MessageDlg (caption buttons) are translated correctly.

Posted: Thu Oct 05, 2006 5:14 am
by isiticov
It looks like there is some OLE or ActiveX control used on your form, like TWebBrowser or so. And some of its properties couldn't be translated, but TsiLag tries this. So just check the translations list and exclude this control's properties.
Please let me know if this helps.

Posted: Thu Oct 05, 2006 11:03 pm
by tazthedev
my tsilang problem is now resolved. I just delete the component from the form, and put a new tsilang1 vcl. with all the same strings.. its works.

But i still have problems with the caption buttons of the skinmessage.messagedlg() ...

It works with vclskin component set but not working with the businessskinform component set..

Even if activelanguage is set to french, the caption button from skinmesssage.messagedlg() stills in english..

:( :( :(

Posted: Fri Oct 06, 2006 9:12 pm
by tazthedev
cannot translate caption buttons from Skinmessage.messagedlg() from the Almediadev Component set (BusinessSkinForm)...

But now, i can with VclSkin, SUISkin and SkinEngine. So... I'll take one of these instead. I will remake my application. ..

Thanks for your helps, but if one of these days, you can try the component from www.almediadev.com and yours, plz let me know :) :)

Thank you so much for your time.

Posted: Sat Oct 07, 2006 4:08 am
by isiticov
BusinessSkinForm uses hardcoded values for these captions, which is not good. And I afraid it is not possible to handle this.