• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

My version of Delphi is in french, but I want to have error message in english, how to?

Hi all,

My version of Delphi is in french, but I want to have error message in english,

if I use windows API, if a error message pop up, it will be shown in the language of the computer where it is executed, but when I use function of VCL, error message appear to be in french even if the local language of the computer where it is executed is english,

how to fix that? do I really have to get an english version of Delphi?

when I check resource of my compiled application, there is one named "String", inside this, there is many errors message, but they are in french, I attached a screenshot,


any idea?

500 points for this one, thx
2008-01-28-231007.jpg
0
Marc582
Asked:
Marc582
  • 3
  • 3
  • 2
  • +1
1 Solution
 
ziolkoCommented:
>>but when I use function of VCL, error message appear to be in french even if the local language of the computer where it is executed is english

maybe you could get english resourestrings for native VCL but if you have some third party components then all messages will be in language those components were created with.
If you want to create multinational applications try delphi built-in tool or check out multilizer (http://www.multilizer.com/)

ziolko.
0
 
Marc582Author Commented:
>> maybe you could get english resourestrings for native VCL but if you have some third party components then all messages will be in language those components were created with.

yea I know this, my worry is about the VCL itself since all of component I use are English based.

I'm still looking for solution other than http://www.multilizer.com/)
0
 
ziolkoCommented:
>>yea I know this, my worry is about the VCL itself since all of component I use are English based.

I think the best method is to use english Delphi, I did quick search over VCL source code and I've found more than 300 files containing >>resourcestring<< keyword

ziolko.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Marc582Author Commented:
ok, maybe you are right, I let this open to see if someone else has a better/quicker solution for me
0
 
mikelittlewoodCommented:
I'm not sure if you are just on about the delphi IDE, or one of your own applications.
If it's the IDE then yes I would agree you should buy an english version.

Its been a long time since I did any multi lingual applications, but if I remember right we always used to use the translation repository. Here you can specify multiple language messages and set application properties so that it can work out which message string it should be displaying.
0
 
developmentguruPresidentCommented:
What method are you using?  If you simply use

MessageDlg('My Error Message', mtWarning, [mbOK]. 0);

Then the text you place in the quotation marks is the text the user sees.  There is no auto translation function built into Delphi.  One way to handle this would be to have a global exception hook that catches types of errors and translates the types to english (if the automatic exception handling is the problem).

this line can be placed in the OnCreate of your main form (will not catch errors before the main form is displayed)

  Application.OnException := MainExceptionHandler;

with the following private declaration and method definition

    procedure MainExceptionHandler(Sender: TObject; E: Exception);

procedure TfMain.MainExceptionHandler(Sender: TObject; E: Exception);
begin
  if E is EDivideByZero then
    begin
      MessageDlg('Divide By Zero', mtWarning, [mbok], 0);
      exit;
    end;

  //next test
end;
0
 
Marc582Author Commented:
yea but would be too much hassle to make the exeption handling message for every possible error in VCL, yea I think I'll switch to an english delphi then

btw yea I'm not talking about the language of the IDE, but the error message of the VCL, as u can see in the screen I posted, when compiled by a french delphi, error message will be in french (error from VCL, not from API of cours which depends on the local language of the comp)
0
 
mikelittlewoodCommented:
That is why I said to try using the translation repositoy built in with delphi. It should allow you to use multiple languages.
0
 
mikelittlewoodCommented:
oops sorry I didnt read your last post, please ignore me.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

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