Home
What's New

User Manual
1. Introduction
2. Basic Uploads
3. Config Params
4. Advanced
5. International
6. File Downloads

Object Reference
Live Demos
Support

Download & Buy

Other Products
Contact Us


Chapter 6. File Download Functionality Chapter 4: Advanced Features Chapter 5: Internationalization

5.1 Unicode Support
5.2 Translation of Text Strings & User Messages

5.1 Unicode Support

Starting with version 3.0, XUpload is a fully Unicode-enabled product. Unlike older versions, XUpload 3.0 accepts files containing Unicode characters in their paths. It also accepts text form items with Unicode characters.

During an upload, XUpload 3.0 uses UTF-8 encoding to transfer Unicode file paths and text fields to the server. Server-side scripts invoked by XUpload must therefore be UTF-8 enabled to convert the encoded text strings back to Unicode.

ASP.NET is UTF-8 enabled by default. If your server-side script is based on classic ASP and AspUpload, you must explicitly enable UTF-8 by setting AspUpload's CodePage property to 65001 (which is the UTF-8 "code page" number), as follows:

Server-Side VBScript:
<%
Set Upload = Server.CreateObject("Persits.Upload")
Upload.CodePage = 65001
nCount = Upload.Save("c:\upload")
...
%>

See the AspUpload User Manual (Chapter 8) for more information on UTF-8.

5.2 Translation of Text Strings & User Messages

Starting with Version 3.0, XUpload's captions, menu items and user messages can be replaced by their equivalents in a foreign language of your choice:


(We thank Benjamin Hsieh for helping create this sample in Mandarine)

You as a developer are responsible for providing the foreign-language equivalents of the standard English-language strings such as "Files", "Size", "Upload", etc. We have provided a web-based form where you need to enter your translations in a language of your choice:

Click to open the Internationalization form

The form is located at http://support.persits.com/xupload/international.aspx.

The left side of the form lists the English-language text strings used by XUpload along with explanations where specifically each string is used. The right side of the form is where you enter your foreign-language equivalents of the strings.

Note that many strings in the User Error and Warning Messages section of the form contain special placeholder symbols such as %s, %d and %lu. It is very important that these placeholders be preserved in the translations. The order in which multiple placeholders appear within the same string must also be preserved.

Once you have entered the translations of all text strings, click the Submit button. At the bottom of the page, a <PARAM> tag will be generated similar to this:

<PARAM NAME="International" VALUE="
aABkADEAPQCUakhoIwAjAGgAZAAyAD0Ad5WmXiMAIwBoAGQAMwA9AIZPkG4jACMAaABkADQAPQDu
doR2IwAjAG0AbgAxAD0AeJDHZJRqSGgjACMAbQBuADIAPQB4kMdk7nYEkyMAIwBtAG4AMwA9APt5
ZJYjACMAbQBuADQAPQD7eWSWaFHokCMAIwBtAG4ANQA9AApOs1AjACMAZgBsADEAPQB4kMdkCk6z
UEtOlGpIaCMAIwBmAGQAMQA9AHiQx2TudgSTIwAjAGYAZAAyAD0ABVMrVFBb7nYEkyMAIwBmAGQA
MwA9AINjz2MjACMAcABiADEAPQAKTrNQLgAuAC4AIwAjAHAAYgAyAD0ACk6zUJRqSGgjACMAcABi
ADMAPQBzXkdXMpCmXiMAIwBwAGIANAA9AGlSGJlCZpOVIwAjAHAAYgA1AD0AXFBiayMAIwBwAGIA
NgA9AEl7hV/eVslhLU4uAC4ALgAjACMAcgBzADEAPQBTAGUAcgB2AGUAcgCzUIZPhHbeVslhCopv
YCMAIwB1AG0AMQA9AFgAVQBwAGwAbwBhAGQAIABFAHIAcgBvAHIAIwAjAHUAbQAyAD0ADU5BUTGK
b1KUag1UunAgACIAJQBzACIAIAAuACAAzZGwZS2KmluUakhoPwAjACMAdQBtADMAPQCFjU6QAGcn
WYR2Ck6zUHhlz5EgACgAJQBkACkALgAjACMAdQBtADQAPQAlAHMAIACFjU6QAGcnWQpOs1BNT0NR
eGUgACgAJQBsAHUAIABiAHkAdABlAHMALgApACMAIwB1AG0ANQA9AEBiCWeUakhoCFQIig1O/YCF
jU6QIAAlAGwAdQAgAGIAeQB0AGUAcwAuACMAIwB1AG0ANgA9AKhgeJDHZIZOJQBsAHUAIAALUJRq
SGgsAA1O+l5wi6hgAE4hawpOs1AqWRpZlGpIaCwAqGCBidZTiG3OVSAAPwAjACMAdQBtADcAPQCS
bKaP1WxTYouVIAAlAHMALgAgAM2RsGUtippblGpIaD8AIwAjAA==">

This Base64-encoded data contains the translated text strings you have entered. Include this <PARAM> tag in your <OBJECT> among other parameters, as follows:

<OBJECT WIDTH=500 HEIGHT=200
  ID="UploadCtl"
  CLASSID="CLSID:E87F6C8E-16C0-11D3-BEF7-009027438003"
  CODEBASE="XUpload.ocx">
<param name="server" value="localhost">
<param name="script" value="/xupload/01_simple_upload.asp">

<PARAM NAME="International" VALUE="   aABkADEAPQCUakhoIwAjAGgAZAAyAD0Ad5Wm...
  doR2IwAjAG0AbgAxAD0AeJDHZJRqSGgjACMA...
  ZJYjACMAbQBuADQAPQD7eWSWaFHokCMAIwBt...
  UEtOlGpIaCMAIwBmAGQAMQA9AHiQx2TudgST...
  MwA9AINjz2MjACMAcABiADEAPQAKTrNQLgAu...
  ...
  bKaP1WxTYouVIAAlAHMALgAgAM2RsGUtippb...">

</OBJECT>

Click the links below to run this code sample:

http://localhost/xupload/05_international.asp

Chapter 6. File Download Functionality Chapter 4: Advanced Features 

Home
Copyright © 1998 - 2010 Persits Software, Inc.
All Rights Reserved.
XUpload™ is a trademark of Persits Software, Inc.