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 

3rd party messagedlg...

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



Joined: 03 Oct 2006
Posts: 5

PostPosted: Tue Oct 03, 2006 6:12 pm    Post subject: 3rd party messagedlg... Reply with quote

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...
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Wed Oct 04, 2006 5:18 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
tazthedev



Joined: 03 Oct 2006
Posts: 5

PostPosted: Wed Oct 04, 2006 2:37 pm    Post subject: Reply with quote

Unfortunately, its not working. Sad

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Wed Oct 04, 2006 4:08 pm    Post subject: Reply with quote

At http://www.sicomponents.com/soft/demos/MessageDlg&Resources.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.
Back to top
View user's profile Send private message
tazthedev



Joined: 03 Oct 2006
Posts: 5

PostPosted: Thu Oct 05, 2006 3:32 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Oct 05, 2006 5:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
tazthedev



Joined: 03 Oct 2006
Posts: 5

PostPosted: Thu Oct 05, 2006 11:03 pm    Post subject: Reply with quote

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..

Sad Sad Sad
Back to top
View user's profile Send private message
tazthedev



Joined: 03 Oct 2006
Posts: 5

PostPosted: Fri Oct 06, 2006 9:12 pm    Post subject: Reply with quote

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 Smile Smile

Thank you so much for your time.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Sat Oct 07, 2006 4:08 am    Post subject: Reply with quote

BusinessSkinForm uses hardcoded values for these captions, which is not good. And I afraid it is not possible to handle this.
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