Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 354
  • Last Modified:

replacing consts.pas

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
Dev6
Asked:
Dev6
  • 4
  • 3
  • 2
  • +1
1 Solution
 
kretzschmarCommented:
as far as i know,
the hotkey-shortcut
is retrieved from the os
at runtime
0
 
raidosCommented:
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
 
Dev6Author Commented:
@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
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!

 
kretzschmarCommented:
>i use a german OS
doesn't matter
0
 
kretzschmarCommented:
but i may wrong, of course

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

more this evening
0
 
Dev6Author Commented:
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
 
raidosCommented:
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
 
Dev6Author Commented:
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
 
Lee_NoverCommented:
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
 
Dev6Author Commented:
I don't know why, but now i work ...
I put the file into the project path ...
and it works ...

thanxs
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now