[Lazarus] fpGUI

Marco van de Voort marcov at stack.nl
Sun Jan 16 16:55:04 CET 2011


On Sun, Jan 16, 2011 at 04:08:45PM +0200, Graeme Geldenhuys wrote:
> On Sun, 2011-01-16 at 13:38 +0100, Marco van de Voort wrote:
> > You can postedit resources in a binary, or overlay them with translated
> > resource DLLs. You can't do so with generated code.
> 
> fpGUI can also load translations at runtime - we do that for all our
> products. Admittedly the UI Designer doesn't have support for this yet
> (it's on my todo list). What we have done in the mean time is introduce
> a base form class that has virtual methods like ApplyPreferences,
> ApplyTranslations etc..
> 
> Then in each form we override those methods. In the case of
> translations, we set the widgets captions or text using the resource
> string constant.
> 
> As for resizing and repositioning components due to various languages
> having longer or shorter text. I believe that is the job of the layout
> manager, not the form designer.

The whole point of the windows design is to not become hopelessly stuck if a
formdesigner or programmer hasn't foreseen any possible problem in advance.

Layoutmanagers can suddenly react badly to new screen resolutions etc.





More information about the Lazarus mailing list