Multi-language support for ASP

Source: Internet
Author: User
Outline
Let's imagine that you've designed a successful site using Active Server Pages, and your customers have asked to internationalize this site to provide multiple language versions. What do you do at this time? Please read this article.
Body
First, introduce
Let's imagine that you've designed a successful site using Active Server Pages, and your customers have asked to internationalize this site to provide multiple language versions.
The key to this problem is that you have to use some method to achieve fast page content conversion.
This problem can be viewed as extracting the appropriate data from the database and dynamically displaying it using ASP.
In this article we will discuss how to use the Dictionary object of Active Server Pages and a background database to enable internationalization support.
The specific implementation process is divided into the following three steps:
◇ Design the database and store the text and file path.
◇ read data from the database to the Dictionary object.
◇ reference text and file path in ASP page.
Second, step 1-Design the database and store the text and file paths
We need to spend some time on the database design.
Using this database, we want to be able to properly catalogue all the text and pictures that we want to use, and the text and pictures cannot be duplicated, and if you want to change "yes" to "OK" in the application, Want to make changes in only one place; Web maintainers should be able to quickly find the target text when they change the content.
Based on the above requirements, let's start designing the database.
First create two tables to place the text.
One of the tables is commonstrings, used to store words and phrases that are reused throughout the site.
Another table is specializedstrings, for storing words and phrases that are used only on a particular page.
Storing text that is common and restricted to a particular page is useful for simplifying site maintenance.
All two tables use the Stringkey field to mark Records, use Stringlanguage to describe the language used, and joint stringkey and stringlanguage create a primary key.
Field StringHolder is used to save words, phrases, or statements.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.