可本地化的用户控件

可本地化的用户控件

本文介绍了可本地化的用户控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个已本地化的表单,并且具有已本地化的用户控件,如何使用VS属性中指定的语言查看该表单和控件?

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.

推荐答案

在设计器中进行设计时,必须分别本地化每个用户控件.然后,可以在用户控件上将属性Localizable设置为true并选择您的语言.不幸的是,在设计窗体时,周围的窗体不会将这两个属性升级为其用户控件.这是一个问题,但仅在设计时.但是,在运行时它将起作用,并且您的用户控件应显示正确的本地化值.

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.

这篇关于可本地化的用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 02:01