[Lazarus] Localization in toolkit like fpGUI

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Feb 19 19:26:01 CET 2008


On 19/02/2008, Felipe Monteiro de Carvalho
<felipemonteiro.carvalho at gmail.com> wrote:
> Take a look at how the magnifier handles this. It's a class which
> centralizes all necessary strings and can translate them on demand:
>

Thanks Felipe, but the problem with that implementation is that you
cannot add any new translations without recompiling the application.
So your idea ends up being the same as what I initially thought of,
but that's not ideal.

eg:
    TTranslations = class(TObject)
     ....
        procedure TranslateToEnglish;
        procedure TranslateToPortuguese;
        procedure TranslateToSpanish;
        procedure TranslateToFrench;
        procedure TranslateToGerman;
        procedure TranslateToItalian;
        procedure TranslateToRussian;
        procedure TranslateToPolish;
    ...
    end;

Regards,
  - Graeme -


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



More information about the Lazarus mailing list