问题
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