How to localize UserControl

你。 提交于 2019-12-07 08:10:53

问题


I'm developing a windows application that must support multiple language.

I've followed the article below http://msdn.microsoft.com/en-us/library/y99d1cd3(v=vs.71).aspx to make my windows application localizable.

Everything works fine except the usercontrols. Do i have to create a usercontrol for each language? How to make the usercontrol inherit the Right to left property? What is the best practice to do it?


回答1:


UserControls have to be localized in the same way as forms (Localizable = True, Language = ...), you don't see the localization in the designer when they are embedded into a localized Form but during the runtime the localization is done well.

For the RightToLeft property: select your UserControl (select a control inside it and press ESC until the main control is selected - in the property panel you should see the name of your UserControl and the type = System.Windows.Forms.UserControl), go to the property panel and search for the RightToLeft property, in the same panel you have also the Localizable and Language property that has to be used as you do in Forms.



来源:https://stackoverflow.com/questions/17693979/how-to-localize-usercontrol

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