Solved

replacing consts.pas

Posted on 2002-06-04
10
323 Views
Last Modified: 2010-04-04
i would like to generate my own consts.pas because i use the english version of delphi but need a german application.
Therfore i would like to replace some text in that consts, but it didn't work.

For example.
In english the
  SmkcCtrl = 'Ctrl+';
i changed to
  SmkcCtrl = 'Strg+';

but the menus still shows "Ctrl+A"

how can i make this work ?

regards
Andreas
0
Comment
Question by:Dev6
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7053898
as far as i know,
the hotkey-shortcut
is retrieved from the os
at runtime
0
 
LVL 3

Expert Comment

by:raidos
ID: 7053904
Not sure if this is your problem but if you don't recompile the Consts.pas, and replace the one in $(DELPHI)\lib with the new one you will never get it to work.

Hope it helps a bit..
Regards
//raidos
0
 

Author Comment

by:Dev6
ID: 7053928
@kretzschmar: I don't think it is retrieved from OS, because i use a german OS and english Delphi, but still get Ctrl instead of Strg !

How can i recompile the consts.pas ?
i just changed the original consts.pas ...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:kretzschmar
ID: 7053943
>i use a german OS
doesn't matter
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 7053947
but i may wrong, of course

there is api-call,
which returns the name,
just test it

more this evening
0
 

Author Comment

by:Dev6
ID: 7053969
the problem is, i don't need a API-call, but if i set the shortcut property of a menuitem or action, i get 'CTRL-A' this isn't from the OS, because all other applications (they are german) are using 'STRG-A'
0
 
LVL 3

Expert Comment

by:raidos
ID: 7054039
hmm...well...i guess simply renaming $(DELPHI)\lib\consts.dcu to something else would force delphi to recompile the Consts.Pas...if not you might have to include the path to it in your Environment, or simply move consts.pas to $(DELPHI)\lib

Regards
//raidos
0
 

Author Comment

by:Dev6
ID: 7054122
i just deleted all consts.pas and consts.dcu i found on my system and only the one consts.pas exists (with the german text) but it doesn't work.

i put the menus.pas into my project directory.

MenuKeyCaps: array[TMenuKeyCap] of string = (
    SmkcBkSp, SmkcTab, SmkcEsc, SmkcEnter, SmkcSpace, SmkcPgUp,
    SmkcPgDn, SmkcEnd, SmkcHome, SmkcLeft, SmkcUp, SmkcRight,
    SmkcDown, SmkcIns, SmkcDel, SmkcShift, SmkcCtrl, SmkcAlt);


This is the array, which holds all the Special Text for the menus, but the Smk... are defined in the consts, and there are allready the right values. But at runtime, the array holds for the Ctrl key 'Ctrl+'

Why ?
0
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 200 total points
ID: 7054895
you should copy the consts.pas to your project folder
do whatever changes need to be done
then recompile the project
if necessary Build the project
that will surelly use your modified consts.pas
0
 

Author Comment

by:Dev6
ID: 7055715
I don't know why, but now i work ...
I put the file into the project path ...
and it works ...

thanxs
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question