WinForms - Localization - UI controls positions different in additional Culture

落花浮王杯 提交于 2019-12-11 03:36:05

问题


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.

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"(?!)

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

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.

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

Greetz!


回答1:


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.



来源:https://stackoverflow.com/questions/2536191/winforms-localization-ui-controls-positions-different-in-additional-culture

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