翻译 - 如何从一种语言翻译成另一种语言 [英] Translation - how to translate from one language to another
本文介绍了翻译 - 如何从一种语言翻译成另一种语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以帮我提示如何从一种语言翻译成另一种语言(英语到泰米尔语)
我尝试了什么:
从一种语言翻译成另一种语言
Hi,
Can any one help me with any hint how to translate from one language to another (English to Tamil)
What I have tried:
translate from one language to another
推荐答案
尝试 Google翻译 [ ^ ]
选择您想要的语言并粘贴页面的URL以翻译或粘贴文本。
try Google Translate[^]
Select the language you want and paste the URL of page to translate or paste text.
如果您使用Win表单,您可以使用System.Windows.Forms.Control.ControlCollection
循环遍历所有控件,然后翻译文本。
Microsoft的官方方式是使用Satellite Assemblies
,这样做的好处是可以将所有资源用于语言(文本,图像等)每种语言一个DLL。
请参阅:为桌面应用程序创建附属程序集 [ ^ ]
缺点是当你有很多表单和语言时,你的应用程序大小很快会变得非常大。
您可以使用的免费工具是 Zeta资源编辑器:编辑.NET字符串资源并行 [ ^ ]
第一种方法的例子:
If you use Win Forms, you could useSystem.Windows.Forms.Control.ControlCollection
to loop through all controls and then translate the text.
The official Microsoft way is to use "Satellite Assemblies
", this has the advantage that you can put all resources for a language (text, images etc.) in one DLL per language.
See: Creating Satellite Assemblies for Desktop Apps[^]
The disadvantage is that when you have many Forms and languages, your application size will soon become very large.
A free tool you can use is the Zeta resource editor: Edit .NET string resources in parallel[^]
An example of the first method:
/// <summary>
/// Get the text for Form controls from Resource1
/// </summary>
private void TranslateForm()
{
string formName = this.Name + "_";
string str;
foreach (Control ctrl in this.Controls)
{
System.Diagnostics.Debug.Print(formName + ctrl.Name);
System.Diagnostics.Debug.Print(ctrl.GetType().ToString()); // e.g. System.Windows.Forms.Label
try
{
str = Resource1.ResourceManager.GetString(formName + ctrl.Name); // Form1_lblAddress etc.
ctrl.Text = str;
}
catch (Exception)
{
Debug.Print(".");
}
}
}
这篇关于翻译 - 如何从一种语言翻译成另一种语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文