的WinForms字符串资源文件,连接起来的设计师 [英] WinForms strings in resource files, wired up in designer
问题描述
我试图本地化多语言WinForms应用程序。我试图找到一种方法来设置我的表单标签/按钮文本属性从资源文件中读取设计(而不是维持code,设置他们编程一大块)。
I'm trying to localise a WinForms app for multiple languages. I'm trying to find a way to set my form labels/buttons text properties to read from the resources file in the designer (rather than having to maintain a chunk of code that sets them programatically).
我发现我可以设置form.Localizable =真,但随后的资源是从旁边的表格文件中读取,但许多煤矿在多个表单共享。
I've found I can set form.Localizable=true, but then the resources are read from a file alongside the form, but many of mine are shared across multiple forms.
有什么办法来设置在设计师的标签的文字,存放在项目级的resx文件中的值?
Is there any way to set a label's text in the designer, to a value stored in a project-level resx file?
推荐答案
要回答这个问题,没有。
To answer the question, no.
但海事组织,这不应该做的反正,如果文本将是静态的。
But IMO, this should not be done anyways if the text will be static.
有一个读我的答案,本地化和资源:
资源字符串位置
<一href="http://stackoverflow.com/questions/1519648/globalize-an-existing-windows-forms-application/1520541#1520541">Globalize在现有的Windows窗体应用程序
<一href="http://stackoverflow.com/questions/1820912/using-resx-files-for-global-application-messages/1821079#1821079">Using .resx文件的全局应用程序的消息
Have a read at my answers on localization and resources:
Resource string location
Globalize an existing Windows Forms application
Using .resx files for global application messages
这篇关于的WinForms字符串资源文件,连接起来的设计师的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!