To solve the problem of the internationalization of cultural / AjaxFileUpload.

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Provided by Microsoft official AjaxControlToolKit, in the ASP.NET development process, can bring a lot of convenience to the developers, developers duplication of labor saving. This control is also relatively mature, in terms of performance is not too bad, at least can meet the development needs.

At present, in the work, need to use Microsoft AjaxFileUpload files asynchronously upload control, this control has the following advantages: 1, can implement multiple file upload. 2, file upload have progress display. 3, can limit the type and number of upload images upload. 4, easy to use, control development.

However, the only shortage, people want to spit is the internationalization of this control supports, is really too bad. He can not be like other controls, UICulture='auto'can automatically match the specified language, Chinese webpage search results on the web, is always a few solutions, but also look confused (probably the wrong version, I use the version of the June 2013 Release), ah, fuck, online say that is what.

No way, with many years of experience, Chinese can not solve the problem, foreigners had settled, I was prepared for GOOGLE, in addition to stack flow (StackOverFlow, ha ha ~). Well, after a few minutes to explore, fuck, really has the answer. So, I at the address below, find the solution:

Post code is as follows:

 <script type="text/javascript">

  //  Jquery support

     $(document).ready(function () {


     function AjaxFileUpload_change_text() {

      //The change that you want to display the text. 

         Sys.Extended.UI.Resources.AjaxFileUpload_SelectFile = "Select File";
         Sys.Extended.UI.Resources.AjaxFileUpload_DropFiles = "Drop files here";
         Sys.Extended.UI.Resources.AjaxFileUpload_Pending = "pending";
         Sys.Extended.UI.Resources.AjaxFileUpload_Remove = "Remove";
         Sys.Extended.UI.Resources.AjaxFileUpload_Upload = "Upload";
         Sys.Extended.UI.Resources.AjaxFileUpload_Uploaded = "Uploaded";
         Sys.Extended.UI.Resources.AjaxFileUpload_UploadedPercentage = "uploaded {0} %";
         Sys.Extended.UI.Resources.AjaxFileUpload_Uploading = "Uploading";
         Sys.Extended.UI.Resources.AjaxFileUpload_FileInQueue = "{0} file(s) in queue.";
         Sys.Extended.UI.Resources.AjaxFileUpload_AllFilesUploaded = "All Files Uploaded.";
         Sys.Extended.UI.Resources.AjaxFileUpload_FileList = "List of Uploaded files:";
         Sys.Extended.UI.Resources.AjaxFileUpload_SelectFileToUpload = "Please select file(s) to upload.";
         Sys.Extended.UI.Resources.AjaxFileUpload_Cancelling = "Cancelling...";
         Sys.Extended.UI.Resources.AjaxFileUpload_UploadError = "An Error occured during file upload.";
         Sys.Extended.UI.Resources.AjaxFileUpload_CancellingUpload = "Cancelling upload...";
         Sys.Extended.UI.Resources.AjaxFileUpload_UploadingInputFile = "Uploading file: {0}.";
         Sys.Extended.UI.Resources.AjaxFileUpload_Cancel = "Cancel";
         Sys.Extended.UI.Resources.AjaxFileUpload_Canceled = "cancelled";
         Sys.Extended.UI.Resources.AjaxFileUpload_UploadCanceled = "File upload cancelled";
         Sys.Extended.UI.Resources.AjaxFileUpload_DefaultError = "File upload error";
         Sys.Extended.UI.Resources.AjaxFileUpload_UploadingHtml5File = "Uploading file: {0} of size {1} bytes.";
         Sys.Extended.UI.Resources.AjaxFileUpload_error = "error";


   Need serious reminder, this solution has a flaw, that is not good enough for the browser compatibility, currently only tested FireFox first loading cannot replace Chinese problem, IE browser support good. But don't worry, the developer's clients are generally Chinese, “ IE6, you'll see“.

   Finally, through this matter, fully demonstrated the benefits of learning English, but also fully demonstrated, baidu is a web site is not suitable for programmers, like that of a slogan: cherish life, away from Baidu.


(This article also can solve: ajaxFileUpload how to display Chinese, how AjaxFileUpload supports a statement of the problem Chinese etc. )

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Lee at November 15, 2013 - 2:04 AM