how change the title of the dialog box?
2013-03-29 14:48
627 查看
unit Funcoes_Traducao_u; {Objetivo:Traduzir automaticamente todas as mensagens do inglês Motivo: O UniGUI da versão atual não tem função de localização das mensagens internas doDelphiNoTUniServerModule tem a propriedade ExtLocate que tem que ficar pt_BR para tradução de algumas mensagens para portugues, mas isso será somente para algumas e para Web.Usar o tradutor do delphi vai duplicar o projeto e complicar o processo de desenvolvimento.Fonte: http://leandropiga.nothus.com.br/?p=38Forma de utilização:Basta adicionar essa unit no projeto.Atualizações:Para traduzir outras mensagens, deve-se buscar nos arquivos de constantes do delphi (Windows,Consts,DBConsts,VDBConsts) a identificação da mensagem e substituir ela conforme abaixo pelo novo nome.} interface uses Windows,Consts,DBConsts,VDBConsts; procedure SetResourceString(AResString:PResStringRec;ANewValue:PChar); constSNewMsgDlgConfirm:PChar='Confirmação';SNewMsgDlgYes:PChar='Sim';SMewMsgDlgNo:PChar='Não';SNewMsgDlgOK:PChar='Ok';SNewMsgDlgCancel:PChar='Cancelar';SNewDeleteRecordQuestion:PChar='Excluir Registro?';SNewDeleteRecord:PChar='Excluir Registro?'; implementation procedure SetResourceString(AResString:PResStringRec;ANewValue:PChar);varPOldProtect: DWORD;beginVirtualProtect(AResString,SizeOf(AResString^), PAGE_EXECUTE_READWRITE,@POldProtect);AResString^.Identifier:=Integer(ANewValue);VirtualProtect(AResString,SizeOf(AResString^),POldProtect,@POldProtect);end; initialization SetResourceString(@SMsgDlgConfirm,SNewMsgDlgConfirm);SetResourceString(@SMsgDlgYes,SNewMsgDlgYes);SetResourceString(@SMsgDlgNo,SMewMsgDlgNo);SetResourceString(@SMsgDlgOK,SNewMsgDlgOK);SetResourceString(@SMsgDlgCancel,SNewMsgDlgCancel);SetResourceString(@SDeleteRecordQuestion,SNewDeleteRecordQuestion);SetResourceString(@SDeleteRecord,SNewDeleteRecord); end.
相关文章推荐
- How to Change the Size of a Box-Plot Label in MATLAB
- How to change the background color of an Edit Box
- How to change the language of jDeveloper UI
- How To Change the Partition Column Of A Partitioned Table Using DBMS_Redefinition [ID 846405.1]
- HOW TO CHANGE THE DEFAULT KEY-VALUE SEPARATOR OF A MAPREDUCE JOB
- how to change the port of tomcat
- how to edit the grub to change the sequance of system
- 怎样控制Qt标题栏(How can I handle events in the titlebar and change its color etc ? )
- How to open the dialog out of iframe by using jquery dialog
- 怎样控制Qt标题栏(How can I handle events in the titlebar and change its color etc ? )
- How to get the value of a form element : check box and radio button
- How to Change the language of a site template
- How To Change the Background Color of a Tab Control
- How to Change the Hostname of a Linux System
- How to change the status of Prepayment invoice
- How to change the background color of form using C++ - 如何用C++改变窗体的颜色
- 如何调整Dreamhost主机PHP上传尺寸的限制/How to change the maximal size of uploading in your Dreamhost
- How to change the size of the button of an android checkbox?
- How to change the name of logfile dynamically using log4j
- How to change the implementation (detour) of an externally declared function