Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

replacing consts.pas

Posted on 2002-06-04
10
319 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi - replicating a form 8 81
Tviruailstringtree sort multi columns on header click 1 74
DBGrid or StringGrid ? 6 105
MS Access from Delphi 31 60
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

861 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