[Lazarus] Changing the translation of forms while the program is running
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Jul 16 14:18:43 CEST 2012
On Mon, 16 Jul 2012 11:49:42 +0100
Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
> Hi,
>
> On 16 July 2012 11:27, Bart <bartjunk64 at gmail.com> wrote:
> >
> > This would make maintanance (large menu's, active devolopment of forms
> > in question) lots easier.
>
>
> What I did is to encapsulate setting up captions to a single method,
> SetupCaptions, on each form. I use form inheritance, so each form
> simply needs to override that method. That method is called in
> FormCreate to setup all components. If the application language
> changes at runtime, I ask fpgApplication so broadcast a message to all
> loaded forms of the application. Those forms receive the message, and
> execute the SetupCaptions method again. Works like a charm.
Yes. This catches all special cases like memos, tree nodes, list views
and private variables as well.
Mattias
More information about the Lazarus
mailing list