如何在c#中改变语言/文化 [英] how to change language/culture in c#
本文介绍了如何在c#中改变语言/文化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好家伙
i希望改变我的整个项目在urdu语言查询数据保存在服务器等也显示窗口形式的urdu语言请任何人帮助如何这样做
谢谢: - )
hello guys
i want to change my whole project in urdu language queries data save in server etc also show urdu language on window form please any one help how do this
thanks :-)
推荐答案
要改变程序中的文化,你可以这样做:
To change the culture in your program, then you can do it like this:
CultureInfo ci = new CultureInfo("ur");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
如果你只使用.NET 4而不是.NET 4.5
你有记住在你正在制作的每个线程或任务中改变文化。
在.NET 4.5中,有一种新的全局方式可以将所有线程更改为新的文化。
If you are only using .NET 4 and not .NET 4.5
You have to remember to change the Culture in every Thread or Task you are making.
In .NET 4.5, there is a new global way to change all Thread to a new culture.
CultureInfo ci = new CultureInfo("ur");
CultureInfo.DefaultThreadCurrentCulture = ci;
CultureInfo.DefaultThreadCurrentUICulture = ci;
CultureInfo.DefaultThreadCurrentCulture [ ^ ]
http://www.csharp-examples.net/culture-names/ [ ^ ]
无法自动翻译您的软件UI元素或数据库存储的字符串任何语言,更不用说乌尔都语。那里有机器翻译 - 例如谷歌翻译 - 但没有办法自动转换你的应用程序或它读取的数据。
任何这样的翻译几乎肯定会需要大量的人力投入。
There is no way to automatically translate your software UI elements, or the database stored strings to any language, let alone urdu. There are machine translations out there - Google translate for example - but there is no way to automatically convert your app or the data it reads.
Any such translation will almost certainly require a good deal of human input.
这篇关于如何在c#中改变语言/文化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文