您的位置:首页 > 编程语言 > ASP

关于ASP.NET MVC框架的代码提示汉化实现方法

2009-06-08 14:55 716 查看
本人前几天刚刚接触ASP.NET MVC框架,发现该框架里面得类、方法、以及属性等在vs2008中的代码提示是英文的,个人感觉使用起来非常不方便,不知大家感觉如何,经过我的一番研究,终于发现了汉化的方法,其实很简单,在MVC的安装目录的“Assemblies”文件夹中有两个文件分别为:1、System.Web.Mvc.dll(MVC的程序集)2、System.Web.Mvc.xml此文件为xml文件,用记事本就可以打开,当然最好用va2008打开,打开后的问价内容如下:

<?xml version="1.0"?>
<doc>
<assembly>
<name>System.Web.Mvc</name>
</assembly>
<members>
<member name="T:System.Web.Mvc.TempDataDictionary">
<summary>
<!--Represents a set of data that persists only from one request to the next-->.
代表一个数组
</summary>
</member>
<member name="M:System.Web.Mvc.TempDataDictionary.#ctor">
<summary>
初始化一个新的示例 <see cref="T:System.Web.Mvc.TempDataDictionary"/> class.
</summary>
</member>
<member name="M:System.Web.Mvc.TempDataDictionary.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
初始化一个新的示例 <see cref="T:System.Web.Mvc.TempDataDictionary"/> class.
</summary>
<param name="info">The info.</param>
<param name="context">The context.</param>
</member>
<member name="M:System.Web.Mvc.TempDataDictionary.Load(System.Web.Mvc.ControllerContext,System.Web.Mvc.ITempDataProvider)">
<summary>
加载一个指定的 controller context.
</summary>
<param name="controllerContext">The controller context.</param>
<param name="tempDataProvider">The temp data provider.</param>
</member>
<member name="M:System.Web.Mvc.TempDataDictionary.Save(System.Web.Mvc.ControllerContext,System.Web.Mvc.ITempDataProvider)">
<summary>
存储在指范围的 controller context.
</summary>
<param name="controllerContext">The controller context.</param>
<param name="tempDataProvider">The temp data provider.</param>
</member>
<member name="M:System.Web.Mvc.TempDataDictionary.Add(System.String,System.Object)">
<summary>
Adds an element with the provided key and value to the <see cref="T:System.Collections.Generic.IDictionary`2"/>.
</summary>
<param name="key">The object to use as the key of the element to add.</param>
<param name="value">The object to use as the value of the element to add.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="key"/> is null.
</exception>
<exception cref="T:System.ArgumentException">
An element with the same key already exists in the <see cref="T:System.Collections.Generic.IDictionary`2"/>.
</exception>
<exception cref="T:System.NotSupportedException">
The <see cref="T:System.Collections.Generic.IDictionary`2"/> is read-only.
</exception>
</member>
<member name="M:System.Web.Mvc.TempDataDictionary.Clear">

以其中一个节点为例讲解:

<members>
<member name="T:System.Web.Mvc.TempDataDictionary">//类名称
<summary>
<!--Represents a set of data that persists only from one request to the next-->//此处就是该类的详细解释(已被我注释掉)
代表一个数组//此处是我用金山词霸翻译过来的详细解释
</summary>
</member>

由于本人E文不是一般的烂,所以希望E文高手能够将这个文件翻译一下,造福广大程序员,哈哈!

最后说一下如何使用汉化后的System.Web.Mvc.xml文件,很简单将原来的覆盖即可(强烈建议:覆盖前先备份System.Web.Mvc.xml)。

由于本人接触MVC不久,不知我说的方法是否可行,本文也只是向抛砖引玉,希望高手们多多指教!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐