Localization Sample

This demo application demonstrates how to use File Downloader at international Web sites where several languages should be supported.


The application contains translations into the following languages:

  • English
  • Russian


The file list, that is used in this sample, is static for brevity. However, if you want to add more files for download, you can edit this list as described in the How to Build Download File List topic.

Client-Side Code

All text elements of File Downloader can be changed. In particular, you can translate them into any language. There are special properties that correspond to all text labels or caption that appear in the control, that is why each label can be translated. Moreover, you can create several translations and switch between them depending on the user's choice.

To achieve that, properties with translated strings are imported from external JavaScript files. In this demo these files are stored in the Resources folder. When the user selects a language, appropriate text parameters are applied. In general, this process looks like this:

  1. A simple drop-down menu is used to let the user choose between available languages.
  2. The menu handler, translate(), checks if the page is fully loaded.
  3. If the page is loaded, the translate() function reads the value of the selected menu item and applies the corresponding translation.

See the Customizing Appearance topic for more details.

Server-Side Code

This sample does not require any special server-side code.

See Also