3
DialogResult result = MessageBox.Show("Do you want to delete?", string.Empty, MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button1);

            if (result == DialogResult.No)
            {
                return;
            }

And then i get popup Message with "Yes" and "No". Can i translate this two buttons and if yes how?

EDIT:

if anyone has similar problem look here:

http://www.christec.co.nz/blog/archives/134

Suman Banerjee
  • 1,923
  • 4
  • 24
  • 40
senzacionale
  • 20,448
  • 67
  • 204
  • 316

3 Answers3

5

No.

MessageBox.Show calls a native API function which shows a standard Windows dialog box.
The buttons will appear in the current system UI language.

If you want more control, create your own form.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • what to use then to have "Da" and "Ne" instaed of "Yes" and "No" – senzacionale Sep 09 '11 at 13:11
  • Make your own form with two buttons, or just assume that if the user wants buttons in a different language, they're already running a copy of Windows localized to that language. – SLaks Sep 09 '11 at 13:30
  • i am searching for some created form but no one works for mobile compact framework 3.5 – senzacionale Sep 12 '11 at 05:55
2

If you're talking about the 'Yes'/'No' text in the popup, the text defaults to the local language set by the OS.

If you want to localize them to some other language, you'll have to implement your own MessageBox-like class.

Justin Niessner
  • 242,243
  • 40
  • 408
  • 536
0

On a computer with Russian language set a default UI language, your TextBox will display Da (Да) and Net (Нет) automatically instead of Yes and No. So basically you don't need to localize these.

P.S. Same applies to other UI localizations.

Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174