如何在asp.net中本地化Microsoft Chart [英] how to localize Microsoft Chart in asp.net

查看:103
本文介绍了如何在asp.net中本地化Microsoft Chart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Microsoft图表,效果很好,但我不想以英文模式显示数字,
我需要以1256个字符集显示数字;

任何帮助将不胜感激.

I am using microsoft chart and it works great but i dont want show numbers in english mode,
I need to show numbers in 1256 char-set;

any help would be greatly appreciated.

推荐答案

您去哪儿了?即使在HTML页面中可以使用1256个字符集,也已将其替换为Unicode,后者可用于在一种文本中支持几乎所有语言. ASP.NET支持Unicode.使用其他任何东西都会很尴尬;我什至不想讨论它.

现在,您是指阿拉伯数字吗?阿拉伯数字有两种不同的含义.常用数字"0"到"9"也被称为阿拉伯数字",因为它们是X世纪阿拉伯人在欧洲引入的.如果您指的是阿拉伯数字的较旧形式(٠-١-٢-٣-٤-٥-٦-٧-٨-٨),代码点U + 0660至U + 0669.这是一个称为东方阿拉伯数字"的系统.

参见:
http://en.wikipedia.org/wiki/Hindu%E2%80%93Arabic_numeral_system [ ^ ],
http://en.wikipedia.org/wiki/Eastern_Arabic_numerals [
现在,恐怕如果您要使用东部阿拉伯语系统,则必须用自己的代码替换数字.据我了解,在阿拉伯国家/地区,两个系统都被使用,默认使用"0"-"9".正如我从其他CodeProject问题中了解到的那样,即使使用阿拉伯文化作为参数,数字类型ToString(IFormatProvider)的方法也将返回带有数字"0"-"9"的字符串.

对于IFormatProvider的用法,请使用实现此接口的类System.Globalization.CultureInfo.

请参阅
http://msdn.microsoft.com/en-us/library/system.globalization .cultureinfo.aspx [ ^ ].

有关ToString(IFormatProvider)用法(带有区域性)的示例,请参见带有代码示例的System.Int32.ToString:
http://msdn.microsoft.com/en-us/library/cht2hdff.aspx [ ^ ].

您当然需要了解Unicode的工作原理.参见:

http://en.wikipedia.org/wiki/Unicode [ http://unicode.org/ [ ^ ],
http://unicode.org/faq/utf_bom.html [
Where have you been? Even though 1256 charset would work in HTML page, it has been replaced with Unicode, which can be used to support nearly all languages in one text. ASP.NET supports Unicode; using anything else would be quite awkward; I don''t even want to discuss it.

Now, do you mean Arabic digits? There are two different meanings in Arabic digits. Commonly used digits ''0'' to ''9'' are also called "Arabic" because they have been introduced in Europe by Arabs in X century. If you mean older form of Arabic numerals (٠‎ - ١‎ - ٢‎ - ٣‎ - ٤‎ - ٥‎ - ٦‎ - ٧‎ - ٨‎ - ٩), code points U+0660 to U+0669. This is a different system called "Eastern Arabic Numerals".

See:
http://en.wikipedia.org/wiki/Hindu%E2%80%93Arabic_numeral_system[^],
http://en.wikipedia.org/wiki/Eastern_Arabic_numerals[^].


Please pay attention: you can also use Persian variant of Eastern Arabic numerals, with each digit using different Unicode code point, even for digit glyphs looking identical. Please see the second link above.
[END EDIT]

To find any code point, you can use the "Character Map" application bundled with all versions of Windows, charmap.exe.

Now, I''m afraid that if you want to use Eastern Arabic system, you will have to replace the digits by your own code. As far as I understand, in Arabic countries both systems are used, and the use of ''0''-''9'' is the default. As I learned from the other CodeProject questions, the methods of numeric types ToString(IFormatProvider) will return a string with ''0''-''9'' digits even if Arabic culture is used as the argument.

For thee usage of IFormatProvider, use the class System.Globalization.CultureInfo which implements this interface.

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

For example of the usage of ToString(IFormatProvider) (with culture) see, for example System.Int32.ToString with code sample:
http://msdn.microsoft.com/en-us/library/cht2hdff.aspx[^].

You certainly need to understand how Unicode works. See:

http://en.wikipedia.org/wiki/Unicode[^],
http://unicode.org/[^],
http://unicode.org/faq/utf_bom.html[^].

—SA


这篇关于如何在asp.net中本地化Microsoft Chart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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