我如何改变非unicode程序windows 7 / xp的语言 [英] how i change language for non-unicode programs windows 7 /xp

查看:571
本文介绍了我如何改变非unicode程序windows 7 / xp的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友。

i搜索谷歌。我发现这些代码。

但我不明白。

我怎么能完成我的代码?

i想要将非unicode的系统语言改为Farsi或Persion。

c#中有一个改变它的方法吗?

代码的eveyline是什么意思?



我的代码:

hello friends.
i searched google .i found these codes about that.
but i do not understand them.
how can i complete my code?
i want to change my system ''S language for non-unicode to Farsi or Persion.
Is there a methode in c# to change that?
what does eveyline of code mean?

my code:

CultureInfo ci = new CultureInfo("tr-TR");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;



已添加代码块[/ Edit]


Code block added[/Edit]

推荐答案

你不能。该程序必须是Unicode之一。



(实际上,您可以使用过时的基于扩展ASCII的编码在非Unicode程序中使用某种固定语言(通常为+英语),但这是非常过时和蹩脚。不要这样做。)



但是,所有.NET应用程序始终支持Unicode。您显示的代码会影响许多方法,尤其是与字符串格式相关的方法:日期时间,货币等格式。重要的是,在本地化应用程序中,它会自动将存储在附属程序集中的资源切换到指定的退回文化(使用嵌入在.NET FCL UI库中的回退机制)到最近的可用文化相关资源。



请参阅: http://en.wikipedia。 org / wiki / Satellite_assembly #Satellite_assemblies [ ^ ]。



如果您只是想在UI中使用不同的语言,那么您不需要所有这些。您只需要一个支持所需字符保留曲目的字体。您需要提供Perso-Arabic脚本( http://en.wikipedia.org/wiki/Perso-Arabic_script [ ^ ]),这是如此受欢迎,它是几乎所有现代操作系统默认支持。



例如,如果您只需在 TextBox 中键入字符,无论UI线程文化是什么,它都会在任何语言的 Text 属性中获取Unicode字符串。



如果使用与任何版本的Windows捆绑在一起的字符映射应用程序(CharMap.EXE),您可以看到哪些字体支持哪些Unicode字符集。



-SA
You cannot. The program has to be Unicode one.

(Actually, you can use some one fixed language (usually, + English) in non-Unicode program using obsolete "extended-ASCII" based encoding, but this is badly obsolete and lame. Don''t do it.)

However, all .NET applications always support Unicode. The code you are showing affects a number of methods, especially related to string formatting: formats of date-time, currency, and more. Importantly, in a localized applications, it will automatically switch resources stored in satellite assemblies to the specified culture of falls back (using fallback mechanism embedded in .NET FCL UI libraries) to the nearest available culture-dependent resource.

Please see: http://en.wikipedia.org/wiki/Satellite_assembly#Satellite_assemblies[^].

You don''t need all that if you simply want to use different languages in the UI. You only need a font supporting required character repertoire. You need to present the Perso-Arabic script (http://en.wikipedia.org/wiki/Perso-Arabic_script[^]), which is so popular that it is supported by default by nearly all modern OS.

For example, if you simply type your character in a TextBox, it will get a Unicode string in its Text property in any language, no matter what is the UI thread culture.

You can see what fonts support what set of Unicode characters, if you use the Character Map application (CharMap.EXE), which is bundled with any version of Windows.

—SA


这篇关于我如何改变非unicode程序windows 7 / xp的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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