1
votes

There exists (for me) a problem with MessageBox show.

My app is multilingual (English/German).

I am testing on a windows which language is in English. Setting the app to German language works fine but showing a MessageBox creates a mixture of the languages. Message is in German (via Resource files) and language of the buttons in messagebox is in English (Yes No instead of Ja Nein). My client uses only German windows versions and can have the opposite problem->buttons in German and (messagebox) text in English if he wants to use the app in English.

Can .NET Language Packs resolve these conflicts? Means -> Installing .NET Language Packs to avoid this language mixture.

message box http://img401.imageshack.us/img401/1914/dlglang.jpg

2

2 Answers

4
votes

.NET language packs do not affect text of OS elements (obviously!). So they won't affect text of buttons on WinForms message boxes, because they use the Win32 MessageBox function. That means that, if your client has a German version of Windows, then all stock UI elements - such as those buttons - will be in German no matter what. If he has Vista, he can buy extra language packs, but even then only one can be active for the user (and not for a specific application) at any given time.

If your client desires to use your application in English only, then either he has to use an English Windows version, or you have to code your own message box where you define button labels yourself.

0
votes

this issue has currently a low priority for me. another try could be :

using of System.Windows.Forms.MessageBox.Show instead of System.Windows.MessageBox.Show

http://www.codeproject.com/KB/miscctrl/Localizing_MessageBox.aspx

if somebody has already experience with this project from CodeProject: please reply :)