MessageBox的按钮 - 集语言? [英] MessageBox buttons - set language?

查看:115
本文介绍了MessageBox的按钮 - 集语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有当您使用MessageBox.Show()你选择的<一个href=\"http://msdn.microsoft.com/en-us/library/system.windows.forms.messageboxbuttons%28v=vs.110%29.aspx\">MessageBoxButtons从中选择。可用的按钮是一个枚举,给你喜欢否选项,确定取消,等等。

When you use MessageBox.Show() you have a selection of MessageBoxButtons to choose from. The buttons available are an enum, and give you options like "Yes No", "OK Cancel", etc.

当我使用,例如,挪威MessageText中用户仍然得到了英国否。

When I am using, for instance, Norwegian messagetext the user still gets the English "Yes No".

有没有办法更改按钮的文本(在C#),这样的语言是正确的?我可以覆盖文本,或设置当前区域在某些方面,这样我可以有巾帼不让须眉JA而不是否?

Is there a way to change the text of the buttons (in C#) so that the language is correct? Can I override the text, or set the current locale in some way so that I can have "Ja Nei" instead of "Yes No"?

我不希望靠我的客户端安装.NET languagepack。

I do not want to rely on installing a .NET languagepack at my client.

推荐答案

有这个在.NET中没有原生支持(据我所知,无论如何,请纠正我,如果我错了,任何人)。我也碰到过这样的$ C $的CProject文章,似乎做一些消息钩子和P / Invoke的诀窍:
<一href=\"http://www.$c$cproject.com/KB/miscctrl/Localizing_MessageBox.aspx\">http://www.$c$cproject.com/KB/miscctrl/Localizing_MessageBox.aspx

There is no native support for this in .NET (as far as I know, anyway; please correct me if I'm wrong, anyone). I did come across this CodeProject article, that seem to do the trick with some message hooking and P/Invoke: http://www.codeproject.com/KB/miscctrl/Localizing_MessageBox.aspx

这篇关于MessageBox的按钮 - 集语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆