Localizable User Controls

荒凉一梦 提交于 2020-01-04 13:09:09

问题


If I have a form that is localized and has User Controls that are localized, how I can I view the form and the controls in the language specified in the VS Properties?

Right now when I change the language, all my controls that are not part a user control adjust appropriately, but my user controls do not.


回答1:


You have to localize each user control individually when designing it in the designer. Then you can set the property Localizable on the user control to true and choose your language. Unfortunately the surrounding Form does not escalate these two properties to its user controls when the Form is designed. That is a problem, but only at design time. At runtime however it will work and your user controls should show the correctly localized values.




回答2:


Just to make sure: has the user control Localizable=true? It should probably not define a language for its own, to make it use the language set on the parent.



来源:https://stackoverflow.com/questions/627520/localizable-user-controls

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!