Yes/No/Cancel localization?

How can I change mbYes/No/Cancell etc. MessageBox Flags to my national words? -Also, when I'm planning an international version could it be read from Windows?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

just use


the captions will be displayed in the os-language version

meikl ;-)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Perhaps your problem is just the opposite? You are writing a programme that should run in the language it is meant to run rather the language of the version of Windows it is run on?
For example: If your progamme is in French, and it's running on an English release of Windows, if you use messagebox, application.messagebox, showmessage, messagedlg and the like, you will get stuff like:

Etes-vous sure que vous voulez faire ça?
Yes     No   Cancel

Or if your programme is in English and Windows in Spanish:

Are you sure you want to do that?
Sí      No     Cancelar

The answer is simple: if you want Window's language for your buttons, just use this functions.
If you want to be in control of the language of this messages, write your own procedures or functions that create forms with this buttons and labels as needed with the message to be shown, and internationalize (what an ugly word for "translate") the captions in those forms in the same way you are internationalizing all the rest of the application.

Hope it helps:

One more detail:

Bear in mind that, if you want to use the Windows language, then the values in the set of buttons are the same for any language:

if you include mbYes, you won't get a button saying "Yes". You'll get a button saying whatever word means "Yes" in whatever the language of Windows.
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.


>messagebox, application.messagebox, showmessage, messagedlg

all these functions are providing a caption depending on the language
of the delphi release rather than in the language of the os

using os-caption, u have to use the windows-api, which is
most wrapped the the windows-unit

or as you stated is to define a own form for the dialog

meikl ;-)
JacekHAuthor Commented:
Thanks to all. It seems I have to prepare some forms more :)
I have English WinXP but want to run my programs on Polish and German windows. I have to be sure that users get all this Yes/No/Cancel translated to their Ja/Tak etc. ;) I also found consts.pas unit with those descriptions which I have to experiment with :)

Thanks and regards,
No, Meikl. You're right about MessageDlg and ShowMessage. They use captions for the buttons taken from Delphi (from Consts.pas, actually).
MessageDlg also gets it window title from there.
ShowMessage uses the name of the executable (with the .exe trimmed off) as caption for the form.

But MessageBox and Application.MessageBox take the caption of the form as a parameter and the captions for the buttons from Windows, because MessageBox is a Windows API call and Application.MessageBox is just a wrapper for it.


yep, jack, you're right about messagebox, missed this ;-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.