WinForms-本地化-UI控件在其他区域性中的位置有所不同 [英] WinForms - Localization - UI controls positions different in additional Culture

查看:89
本文介绍了WinForms-本地化-UI控件在其他区域性中的位置有所不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了UI设置.原始语言为英语.之后,我将Localizable属性设置为True.将原始resx文件复制到frmMain.de-De.resx(例如).翻译所有字符串.一切正常.

I did my UI settings.Original language is English. After that I set Localizable property to True. Copied original resx file to frmMain.de-De.resx (for example). Translated all strings. Everything works.

但是现在我想更改控件的位置.之后,可见于原始/原始文化(En).当我将文化更改为de-De时,UI控件位于旧位置"(?!)

But now I would like to change positions of controls. After that changes are visible only for original/primary Culture (En). When I change Culture to de-De then UI controls are on the "old positions"(?!)

这是正常行为吗? :O我本地化后无法更改表单上控件的位置?

Is this normal behaviour? :O I'm unable to change controls positions on my form after localization?

有人可以向我解释一下并提供最佳解决方案吗?我确实必须更改UI设计,但是我不想再次手动复制所有翻译后的字符串.

Can someone explain me this and give some best solution. I really have to change UI design but I don't want to manual copy all translated strings again.

如果我的描述不清楚,那么我可以发布源代码,请告诉我.我使用的是VS 2008.

If my description is not clear then I can post source code, just please let me know. I use VS 2008.

格里兹!

推荐答案

如果您在设计器中选择表单本身,然后查看属性,则应该有一个语言字段.

If you select the form itself in the designer, and look at the properties there should be a field Language.

在设计表单时将其保留为默认设置:这是没有特定布局的语言的默认布局.现在,如果您想为另一种语言使用不同的布局甚至是不同的标签,请从语言"属性中选择正确的区域性,然后开始设计表单.

Leave this to default when designing the form: this is the default layout for languages without a specific layout. Now, if you want a different layout or even different labels for another language, select the correct culture from the Language property and start designing your form.

这样做,对默认(在您的情况下为英语)布局的更改将不会反映在特定语言的形式上.这是应该工作的方式,语言的布局是完全独立的.

By doing so, making changes to the default (in your case english) layout will not be reflected on the specific language's form. This is the way it is supposed to work, the layout of languages is completely separate.

这篇关于WinForms-本地化-UI控件在其他区域性中的位置有所不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆