[Lazarus] Translations / Localizations for controls at design time

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Aug 1 09:20:18 CEST 2012


On 1 August 2012 00:07, Maxim Ganetsky <ganmax at narod.ru> wrote:
>
> Reusing string constants is manual process. In my experience in most cases
> constants reusing is not desirable.

Just to give you a very simple example: So you think it is OK for each
form to have there own versions of rsCancel and rsOK for buttons? So
for an application with 200+ forms, that is already a lot of
duplication.


> Besides, I fail to see how can original poster's proposal significantly save
> your time in comparison with manual resourcestring assignments

A custom String property editor could maintain the list of resource
strings - thus adding a new resource on the spot should be possible
and fast. Everywhere else you can simply select an existing resource
string constant to be used in the Caption & Hint properties. There
would be no need for the developer to implement a SetupTranslations()
or SetupCaptions() method in each form. If you make it easy enough,
developer would stop hard-coding English text in the Caption property
of widgets, and opt to rather use resource strings - thus their
programs will be immediately possible for translation. It's much
harder to add translation afterwards, and prone to errors (missing a
translation in some widgets).

Anyway, this is how I envisioned it to work when I researched the idea
for fpGUI's UI Designer. And I will still find a suitable solution.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net




More information about the Lazarus mailing list