Berial
Berial

Reputation: 557

MessageBoxButtons' language different than language of currentculture

Hi I have strange problems with MessageBoxButtons.

I show MesssageBox with standar way

MessageBox.Show("Info","Info",MessageBoxButtons.YesNo,MessageBoxIcons.Warning);

The problem is that YesNo buttons are in english despite the fact that currentCulture is set to other language (pl-Pl). The controls Localizable property is set to true and the default language is chosen. However as I mentioned before I messageBoxButtons' language is different than language of currentCulture. Is there any way to fix this ??

Upvotes: 2

Views: 4516

Answers (3)

Keith Vinson
Keith Vinson

Reputation: 771

One other foot note to this issue: Consider the following, what if windows is setup for the local language, but your program doesn't support that language? Now the user must accept message boxes, and other system level dialogs in a schizophrenic sort of way, part English, part native language. What if the users wished to have the program only be in English? Under the existing CurrentThread.CurrentUICulture property methodology the desired effect can not be produced.

Beat my head against the wall for awhile on that one, maybe if you read this it won't happen to you...

Keith

Upvotes: 1

Hans Passant
Hans Passant

Reputation: 941455

This is by design, the built-in Windows dialogs (like MessageBox) always display text in the system default language. Any user that would be interested in running her machine in a language that's different from the Windows edition language would purchase a license to the Ultimate edition. Which supports downloadable language packs that can change the language text for all Windows programs and dialogs.

This is otherwise not very common, the vast majority of users just buy the Windows edition that matches their native language. The only thing you have to do is to ensure that your program is localized for that language. Even for Ultimate there is no need to support switching on demand in your program, the user simply uses Control Panel's Region and Language applet to switch. This forces a new login which in turn ensures that your program is restarted.

Upvotes: 2

CyberDude
CyberDude

Reputation: 8959

See MessageBox buttons - set language?

Upvotes: 1

Related Questions