.net中从一种语言到另一种语言的语言转换 [英] Language Convertion from one language to another language in .net

查看:96
本文介绍了.net中从一种语言到另一种语言的语言转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我恳求了一个将语言转换从英语转换为斯瓦希里语的应用程序.运作良好.但是,当我为应用程序创建设置时,我无法访问swahili resx文件.一种英语正在显示.我如何获取斯瓦希里语资源文件.在这里,我正在使用Windows application

I cerated a application to change langauge convertion from english to swahili language. it''s work well. but when ever i created the setup for the application, i unable to access the swahili resx file. one english language is displaying. how to i get the swahili resource files. here i am using windows application

推荐答案

您实际上并不需要手动访问资源文件.

.NET框架已经使用卫星程序集的机制为您完成了此操作.您只需要指定所需的线程区域性和线程UI区域性即可;并使用 fallback 机制自动选择卫星组件.

阅读有关创建和使用卫星组件的信息: http://msdn.microsoft.com/en-us/library/21a15yht%28v=VS.100%29.aspx [
You do not really need to access resource files manually.

It is already done for you by .NET framework using the mechanism of satellite assemblies. You only need to specify required thread culture and thread UI culture; and the satellite assembly is selected automatically, with the fallback mechanism.

Read on creation and using of satellite assemblies: http://msdn.microsoft.com/en-us/library/21a15yht%28v=VS.100%29.aspx[^] and around this MSDN article.

No, how to assign a culture? Something like this:

System.Globalization.CultureInfo myCulture =
   new System.Globalization.CultureInfo("es-ES", false); //the string can come from config. file and the like

//...

System.Threading.Thread myThread = System.Threading.Thread.CurrentThread;
myThread.CurrentCulture = myCulture;
myThread.CurrentUICulture = myCulture;



参见:
http://msdn.microsoft.com/en-us/library/system.globalization. cultureinfo.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/bkb1k2x8.aspx [ ^ ].

您需要阅读有关项目全球化以及针对每种文化的本地化的完整技术链.从技术上讲,当您知道所涉及的内容时,它就很容易.

http://msdn.microsoft.com/en-us/library/ms752337.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/aa292205%28v = vs.71%29.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/ms788718.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx [ ^ ].

—SA



See:
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx[^],
http://msdn.microsoft.com/en-us/library/bkb1k2x8.aspx[^].

You need to read about full chain of techniques for globalization of the project and following localizations for each culture. Technically, it''s easy enough when you know what''s involved.

http://msdn.microsoft.com/en-us/library/ms752337.aspx[^],
http://msdn.microsoft.com/en-us/library/aa292205%28v=vs.71%29.aspx[^],
http://msdn.microsoft.com/en-us/library/ms788718.aspx[^],
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx[^].

—SA


我得到了答案.
在这里,我们可以将dll文件添加到安装程序中.....即在此处创建安装文件时,这里有一个选项"Appliction folder"(应用文件夹),在这里我们添加了一个额外的文件夹,即与我们的资源文件文件夹相同(可以在我们的应用程序中找到例如,在bin文件夹中使用swahili资源,在bin文件夹中获得sw文件夹.我们可以在安装程序中将此文件夹添加到applicatio文件夹中...然后在ur应用程序中建立目录并安装安装程序.
i got the answer.
here we can add that dll file into setup..... i.e when we creating setup file here one option is there "Appliction folder" here we add one extra folder i.e same as our resource file folder( this can be located in Our application bin folder for example we take swahili resource, in bin folder we got sw folder. we can add this follder into applicatio folder in setup... then bulid in ur application. and install setup. you got


这篇关于.net中从一种语言到另一种语言的语言转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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