關於ASP.NET MVC架構的代碼提示漢化實現方法

來源:互聯網
上載者:User

本人前幾天剛剛接觸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不久,不知我說的方法是否可行,本文也只是向拋磚引玉,希望高手們多多指教!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.