[Lazarus] Changing the translation of forms while the program is running

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jul 16 00:04:47 CEST 2012


On Sun, 15 Jul 2012 23:58:32 +0200
Bart <bartjunk64 at gmail.com> wrote:

> On 7/15/12, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
> 
> > The IDE forms set all captions when creating. See the FormCreate events.
> > The maintenance work is near zero.
> > Theoretically the code could be put into methods and triggered when the
> > language changes.
> 
> This works well if you create all forms on the fly I guess.
> However the current active form (and all other forms still showing)
> will have to be updated I guess?
> 
> Say I have a mainform with a label with caption := SomeResourceString.
> Now i translate the resourcestring using Translations unit.
> This still leaves my label with the untranslated caption.
> So I have to do MyLabel.Caption := SomeResourceString again after the
> translation.

Yes.

Mattias




More information about the Lazarus mailing list