16.07.2012 15:58, Joost van der Sluis пишет:
On Fri, 2012-07-13 at 15:51 +0200, zeljko wrote:
On Friday 13 of July 2012 15:49:37 Joost van der Sluis wrote:
I'm using the DefaultTranslator unit to translate my application,
but I
would also like to switch to another language on-the-fly, thus
without
restarting the application.

I need that too atm :)

Try the attached patch for DefaultTranslator. With SetDefaultLang('nl')
it will switch the language on-the-fly (to Dutch in this case).

It will loop through all forms in screens and will change all properties
that are present in the .po-file.

Maybe it is an idea to apply this patch so that others can also use
this? Or should users write their own 'DefaultTranslator' unit? (Then
this one could be added to the Wiki as an example)

Applied, thanks.

The only requirement for DefaultTranslator unit IMO is that it should just work when included to program without explicit calling any procedures.

--
Best regards,
 Maxim Ganetsky                  mailto:gan...@narod.ru



--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to