以多语言更改消息框 [英] Change the message box in multi language

查看:79
本文介绍了以多语言更改消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在项目中使用Globalization。如果我在我的项目中选择任何语言,整个项目正在改变为相应的语言,除了消息框信息。如何更改全球化中的消息框信息。如果有人知道它,请帮助我。谢谢。

Hi,

I am using Globalization in my project. if i choose any language in my project whole project is changing in to corresponding language except the message box information. How can to change the message box information in Globalization. if any one know's it please help me. Thank you.

推荐答案

您应该使用资源。 (可以在Project - > Properties ... - > Resources选项卡中找到)



如果使用Resources选项卡,VisualStudio将在Properties中创建Resources.resx文件您可以在其中存储不同类型资源的文件夹。 (例如图像,音频和字符串)您可以在那里添加任何可本地化的字符串,稍后再使用它们,如Properties.Resources.MyMessageBoxTitle。



稍后当您想要添加支持时对于另一种语言,您可以复制该Resources.resx文件并将其重命名为Resources.it-it.resx(或Resources.fr.resx)。然后,资源管理器将自动从相应的资源文件加载字符串。 (基于Thread.CurrentUICulture)
You should use Resources. (Can be found at Project -> Properties... -> Resources tab)

If you use Resources tab then VisualStudio will create Resources.resx file in Properties folder for you where you can store different type of resources. (e.g. Images, Audio and Strings) You can add any localizable strings there and use them later like Properties.Resources.MyMessageBoxTitle.

Later when you want to add a support for another language you can copy that Resources.resx file and rename it to something like Resources.it-it.resx (or Resources.fr.resx). Resource manager then will automatically load the string from a corresponding resource file. (based on Thread.CurrentUICulture)


这篇关于以多语言更改消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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