Solved

replacing consts.pas

Posted on 2002-06-04
10
311 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now