改变形式的联盟(本地化) [英] Changing form lanagues (localization)

查看:85
本文介绍了改变形式的联盟(本地化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过选择复选框,我想更改整个表单语言。

我是c#的新手#请帮助。什么是整个过程。

With the selection of checkboxes I want to change my entire form language.
i am new to c# please help. what is the whole procedure.

推荐答案

这很有可能。首先,您需要全局化应用程序。它应该具有灵活(流畅)布局,以独立于不同语言的字符串;所有依赖文化的数据都应放在资源中;特别是所有UI字符串数据。



完成后,您可以在不同的项目中添加不同语言的资源。除了资源之外,你甚至不需要原始项目。完成后,正确创建附属程序集。它们应根据一些基于文化的命名约定进行命名和放置。



这样,本地化工作可以传递给其他团队而不给他们原始的源代码产品,只有资源。 (当然,这些人应该非常了解产品的使用情况,并且知道两种语言。因此,他们需要自己进行产品供参考和测试。)



框架根据当前线程文化和UI文化自动查找所有附属程序集。您可以在运行时切换文化。如果找不到某个附属程序集,后备机制会找到最近的可用程序,一直找回原始项目资源。



这基本上就是它的本质。您可以在我过去的答案中找到MSDN链接的更多详细信息:

winform .net 中的全球化/本地化问题[ ^ ],

winforms中的全球化 [ ^ ]。



-SA
This is quite possible. First, you need to globalize the application. It should have flexible (fluid) layout to be independent of the strings in different languages; and all culture-dependent data should be placed in resources; in particular, all UI string data.

When this is done, you can add resource in different languages in separate projects. You don''t even need the original projects, nothing except its resources. When this is done, properly, satellite assemblies are created. They should be named and placed according some culture-based naming conventions.

This way, localization work can be passed to some other team without giving them source code of the original product, only the resource. (Of course, those people should know the use of the product very well and know both languages. So, they need to product itself for reference and testing.)

The framework automatically finds all satellite assemblies by current thread culture and UI culture. You can switch culture during run time. If some satellite assembly cannot be found, the fallback mechanism finds the nearest available one, all the way back to original project resources, when nothing is found.

That''s, basically, the essence of it. You will find further detail with MSDN links in my past answers:
globalization/localization problem in winform .net[^],
globalization in winforms[^].

—SA


它不起作用喜欢这里。



以下是询问者的预期:

1. 首先尝试你想要什么去做!你可能会发现它并不那么难。

2.制定你所做的事情看似问题/不工作。



尝试一下,告诉你是否面临问题。

各位会员非常乐意为此提供帮助。
It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it''s not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.


这篇关于改变形式的联盟(本地化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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