Page 1 of 1

MessageDlg

Posted: Mon Aug 31, 2009 4:45 pm
by ix07
Hi.

I'm trying to use SiLang to translate the standard message dialogs. I have placed a TsiLang-component on a data-module and translated all required strings in the "Dialogs"-section. This component is connected to a language-dispatcher component. However when I call "siLang1->MessageDlg(msg, dlgType, buttons, helpCtx, defaultBtn, cancelBtn);" I always get the untranslated standard text, regardless of which "ActiveLanguage" is set (that from the first column). When inspecting the TsiLang-component "ActiveLanguage" has the correct value. Changing it manually in the debug-inspector also results in the same result-string.

What's wrong? Any ideas?

Thanks

Best Regards

P.S.:
Using TsiLang version 6.4 with CB2007

Posted: Tue Sep 01, 2009 9:04 am
by isiticov
Hi,

We can't find a problem in such way, but I can suppose that the prblem somewhere in your code. You can try to create a sample ptoject with the MessageDlg() functionality and check if it works with TsiLang. Later investigate your code to try to find the origin of problem or the difference.

Hope this helps.

Re: MessageDlg

Posted: Tue Sep 01, 2009 4:01 pm
by Jean-Paul Brassard
ix07 wrote:I'm trying to use SiLang to translate the standard message dialogs. I have placed a TsiLang-component on a data-module and translated all required strings in the "Dialogs"-section. This component is connected to a language-dispatcher component. However when I call "siLang1->MessageDlg(msg, dlgType, buttons, helpCtx, defaultBtn, cancelBtn);" I always get the untranslated standard text, regardless of which "ActiveLanguage" is set (that from the first column). When inspecting the TsiLang-component "ActiveLanguage" has the correct value. Changing it manually in the debug-inspector also results in the same result-string.
Hi,
The problem can come from many sources.
1-Check that the link properties between TsiLang components are correctly specified (at run time).

2-You can try to manually remove the TsiLang component from your DFM (after saving its contents in a SIB or SIL), then put a fresh Tsilang component back and reload its contents.

3-If you bought the Full Source version of TsiLang, you can trace the window creation to see what happens with the Dialog messages. TsiLang has special code to create those messages if it does not find them at window creation. I seen a TsiLang bug around this feature in a previous version of TsiLang... You may be fall onto another bug.