?
Solved

localization

Posted on 2002-06-18
12
Medium Priority
?
194 Views
Last Modified: 2010-04-04
i want to localize my program, but i have problem changing captions of some standard windows dialogs,
for example: print dialog, standard msg dialog etc... can someone tell me how to do it and is it possible to do this
at runtime?

thanks in advance.
0
Comment
Question by:kzdown
[X]
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
  • 3
  • 3
  • 2
  • +2
12 Comments
 
LVL 9

Expert Comment

by:ginsonic
ID: 7090224
procedure TForm1.PrinterSetupDialog1Show(Sender: TObject);
begin
   SetWindowText(PrinterSetupDialog1.Handle,'My title')
end;

This is a sample for PrinterSetupDialog but work for the rest of dialogues is the same way.
0
 

Author Comment

by:kzdown
ID: 7091063
what about buttons captions.. etc..?
0
 
LVL 9

Accepted Solution

by:
ginsonic earned 200 total points
ID: 7091656
Something alike:

procedure TForm1.OpenDialog1Show(Sender: TObject);
begin
   SetDlgItemText (GetParent (OpenDialog1.Handle),
                  IDOK, PChar ('&Please open it!'));
   SetDlgItemText (GetParent (OpenDialog1.Handle),
                  IDCANCEL, PChar ('&No, reject!'));
end;

Or go to Consts.pas . Open it, replace the constants with your own . Compile it and then move the dcu file to your LIB directory.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:penich
ID: 7092126
DELPHI allows you to work on multi language appllication.
It provides ITE functionality
See menu Project/Languages/Add...

Please remember that you will need to declare all your String constants as resourcestrings in code. Therefore the titles of all your dealogs should be declared like resourcestring too.
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7092425
What version of Delphi use you penich ?
I have Delphi6 Pro and nothing about Languages option in Project menu :(
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 7092601
about changing the consts.pas unit
you should first copy it to your projects folder
then do whatever changes you need


ginsonic:
dunno if D6 pro has this but in Ent. you simply install the "Borland Integrated Translation Environment" package
I couldn't find it myself so I looked up in the Packages and found it :)

0
 

Expert Comment

by:penich
ID: 7092740
I am using DEPLHI 5
0
 

Author Comment

by:kzdown
ID: 7093160
my final need is to make progrm available to change from one lang to another at runtime...
0
 
LVL 2

Expert Comment

by:mikepj
ID: 7123799
I do that "the hard way" by pulling the texts from a database.  That way dealers can translate my app for their country.
0
 

Author Comment

by:kzdown
ID: 7124222
hi mikepj.

yes. that what i need to do also. i can do that without problems on the forms i have creted, but when i need to applay changes to some standard windows dialogs (print dialog etc..) i got problems. do you know how to sove these problems?
0
 
LVL 2

Expert Comment

by:mikepj
ID: 7124708
Hi kzdown,

The other experts have provided ways to do that (they will work).
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 7125013
why not simply have an ini file like most of the apps have ?
you could make resoruce dlls but then users can't make their own translations
0

Featured Post

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!

Question has a verified solution.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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