Page 1 of 1

work-around for localizing message box caption (mobile)

Posted: Tue Oct 07, 2014 2:12 pm
by wxz
hi,

is it possible to localize the caption of the message box on mobile platforms? In "run time translation" sample project, the translated message box title is not picked up after switch to another language. The manual mentioned about the cause that the caption cannot be translated, is there any work-around for this?

Posted: Wed Oct 08, 2014 1:28 am
by isiticov
Hello,

The simplest workaround would be to implement dialogs using your own form. Just create a dialog form in your project for all dialogs and localize it with TsiLang.

Posted: Wed Oct 08, 2014 6:29 pm
by wxz
thanks. Another thing I'd like to mention is the title of the form. Take the run time sample project as an example, the form tile is "Using TsiLang for building...", this string is not localized when switching between languages. Is it possible to localize it as well?

how to implement a dialog that runs on mobile?

Posted: Tue Oct 14, 2014 6:06 pm
by wxz
isiticov wrote:Hello,

The simplest workaround would be to implement dialogs using your own form. Just create a dialog form in your project for all dialogs and localize it with TsiLang.
hi,
Do you mind elaborating on how to implement a customized message box? The examples I found require functions such as CreateMessageDialog(), which is for VCL projects. Is there an equivalent way to do it in FireMonkey?

Posted: Wed Oct 15, 2014 12:25 pm
by isiticov
CreateMessageDlg() function is quite simple and just creates a TForm and resizes it to fit the message bounds. You can see its realization in Dialogs.pas unit.