 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Lucio Guest
|
Posted: Thu Jul 24, 2003 5:00 pm Post subject: Re: How to get german VCL messages and button captions in ge |
|
|
In the directory ..sourcevcl there is the file "const.pas"
In this file there are all the label that delphi use for caption,button etc.
Make a copy of this file, change all you need, and add it to your project.
I'm sorry, for my English :-)
"Riccardo Foschia" <riccardo.foschia (AT) meta-level (DOT) de> ha scritto nel messaggio
news:3f1fb29b$1 (AT) newsgroups (DOT) borland.com...
| Quote: |
Hello all,
I'm using Delphi 7 Enterprise (english version) and we wrote an
application using runtime packages (vcl etc.) for the german market
(no internationalization required). This means that all captions,
error messages etc. are in german.
The problem now is, that for example button captions in dialogs
created by MessageDlg function are in english (yes, no, cancel etc.).
What can I do to change all VCL generated messages, button
captions and error messages to german?
Thanks in advance for any tips,
Riccardo
PS: I know that files like vcl40.de were shipped with the
german version of Delphi 4 and you had to deploy these files with
the vcl runtime packages to obtain my desired result. But these
files are not shipped with the english version of Delphi 7.
|
|
|
| Back to top |
|
 |
Marco Azevedo Guest
|
Posted: Mon Jul 28, 2003 3:43 am Post subject: Re: How to get german VCL messages and button captions in ge |
|
|
There is another way to fix that. If your problem is only the MessageDialog buttons caption, you can develop a function encapsulating the MessageDialog.
The following function translate the buttons caption and the Dialog form caption to portuguese, using CreateMessageDialog function:
function Mensagem(const Msg:String; DlgType:TMsgDlgType; Buttons:TMsgDlgButtons): Word;
var
FrmMsg: TForm;
begin
FrmMsg := CreateMessageDialog(Msg,DlgType,Buttons);
case DlgType of
mtError: FrmMsg.Caption := 'Erro';
mtInformation: FrmMsg.Caption := 'Informação';
mtConfirmation: FrmMsg.Caption := 'Confirmação';
mtWarning: FrmMsg.Caption := 'Aviso';
end;
if mbYes in Buttons then TButton(FrmMsg.FindComponent('Yes')).Caption := '&Sim';
if mbNo in Buttons then TButton(FrmMsg.FindComponent('No')).Caption := '&Não';
if mbCancel in Buttons then TButton(FrmMsg.FindComponent('Cancel')).Caption := '&Cancela';
Result := FrmMsg.ShowModal;
end;
The CreateMessageDialog is a Delphi internal function. MessageDialog use it. This way you can set the default button focus as well.
Have fun !
Marco
"Riccardo Foschia" <riccardo.foschia (AT) meta-level (DOT) de> wrote:
| Quote: |
Hello all,
I'm using Delphi 7 Enterprise (english version) and we wrote an
application using runtime packages (vcl etc.) for the german market
(no internationalization required). This means that all captions,
error messages etc. are in german.
The problem now is, that for example button captions in dialogs
created by MessageDlg function are in english (yes, no, cancel etc.).
What can I do to change all VCL generated messages, button
captions and error messages to german?
Thanks in advance for any tips,
Riccardo
PS: I know that files like vcl40.de were shipped with the
german version of Delphi 4 and you had to deploy these files with
the vcl runtime packages to obtain my desired result. But these
files are not shipped with the english version of Delphi 7.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|