Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-03

MessageDlg with localized buttons?

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti

Hello,
I noticed that the MessageDlg function shows english captions in the buttons.
How do I instruct it to use the localized (spanish) captions? I'm using a (maybe old: 2008-02-25, SVN revision 14239) lazarus snapshot under windows, lazarus\lcl\languages\lclstrconst.es.po has the correct translations.
Oh, I'd like also to know how to do it under Linux.

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007

Reply by email

Luca Olivetti
to Luca Olivetti

En/na Luca Olivetti ha escrit:

Show quoted text 8 lines
Hello, I noticed that the MessageDlg function shows english captions in the buttons. How do I instruct it to use the localized (spanish) captions? I'm using a (maybe old: 2008-02-25, SVN revision 14239) lazarus snapshot under windows, lazarus\lcl\languages\lclstrconst.es.po has the correct translations. Oh, I'd like also to know how to do it under Linux.

As always, I found the solution right after pressing send. I added

   TranslateUnitResourceStrings('LCLStrConsts', 'lclstrconsts.es.po');

to my FormCreate, but then I need to provide the translation file as well. Is there a way to make this "built-in" to the executable?

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 Fax +34 93 5883007

Reply by email

Graeme Geldenhuys
to Luca Olivetti
Luca Olivetti wrote
to my FormCreate, but then I need to provide the translation file as well. Is there a way to make this "built-in" to the executable?

A week or two ago I added such a feature (compile time and runtime language switching) to fpGUI and related applications built with it. I was wondering if Lazarus has default language switching at compile time? Anybody know?

I bet not, otherwise somebody else other than me would have detected the language translation bug. BTW: This mantis report contains a patch to fix the issue.
http://bugs.freepascal.org/view.php?id=10938

Regards,
- Graeme -

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

Reply by email