473,583 Members | 4,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

whats the best way to have multiple language asp pages?

Hello all,

any advice or links to pages about how to have multiple language asp
pages? For example, you have a database driven website that you want
customers around the world to use. How do you setup the asp pages so
that it is easy to change the text based on where the user is
connecting from?

Thanks,
Mike

Sep 14 '05 #1
1 2027
Mike,
any advice or links to pages about how to have multiple language asp
pages? For example, you have a database driven website that you want
customers around the world to use. How do you setup the asp pages so
that it is easy to change the text based on where the user is
connecting from?


There are several aspects to this. One of which is how/if you automatically
will determine the users locale (like much of microsoft.com does, for
instance), or if you will present a specific language and allow the user to
choose from other languages as he or she pleases. One other aspect is how to
present the correct information based on the users locale or choise. I'll
give you a few pointers on the latter part;

Normally when I start designing a multilanguage site, I start with paper and
pencil, and establish an overview of how the database needs to be designed.
The content and functionality of the site sets the boundaries for this. In a
very simplified version, let's say that the page's build, the layout,
positioning of images, etc. etc. are all done in the asp page. The only data
you store in the database (as far as this example goes, is the acctual text
(and, prehaps, some formatting) of the document. My table handling this
would look something like the following:

tblPages:
fldID, integer, identity, auto increment, no nulls, no duplicates (this
field is only needed if you require a unique identifier, or a primary key)
fldName, (var)char, [size according to preference], no nulls, allow
duplicates
fldContents, (var)char, [size according to preference],no nulls, allow
duplicates (not likely to have duplicates, but nevertheless)
fldLanguage, (var)char, [size according to preference (you should only need
two characters, but maybe the language name is more descriptive)], no nulls,
allow duplicates

That is a VERY simplified table, but it would do the trick. Now, using
whatever method you deem fitting, you either temporary (session variable) or
semi-permanently (cookie) store a variable determining the users prefered
language, or in the event that you need support for browsers/users that do
not allow for cookies, pass a variable with every page request. This
variable allows for filtering what content to provide in the asp page. The
SQL could look like

"SELECT fldContent FROM tblPages WHERE fldName = '" &
strNameOfConten tYouRequest & "' AND fldLanguage = '" & strLanguageVari able &
"'"

Again, this is a gravely simplified query, it does not protect against SQL
injection, and so on. But I hope it gives the general idea. In the database
table, you might want to add colunms for createdDate, validFrom, validTo,
contentActive, and so on, depending on the complexity of the application.

HTH,

//Leif Beaton
Sep 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
16057
by: Nick | last post by:
In ASP you can create a variable that is accessible by all scripts in an application. Is this possible in PHP? Storing a multi-dimensional array in memory has much greater performance benefits than storing in a database or session (which just gets saved to disk anyway). Id like to have my commonly used application variables in memory. Is...
11
4931
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g., http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=Tidy7IDbDHA.2108%40cpmsftngxa06.phx.gbl) that indicate that ASP will queue up requests when they come...
9
2412
by: Colum | last post by:
Hi, I am a complete newcommer to XML. I am planning to build a website with html, interacting with an Oracle db through Jsp. I want to use Xml, mainly because Ive heard about the kind of OO approach it takes, but I cant see how it would be beneficial. Could someone tell me what it the point of seperating content from presentation, surely...
176
8198
by: basecamp | last post by:
just checking the average age of programmers using this group -- thanks
5
2474
by: Panama Red | last post by:
I would like to learn to program in c++ on Linux and AIX systems...mainly socket and fifo type stuff. Can someone recommend a book for someone with experience only with Perl, shell, and Pick/Basic ? Thanks
136
9280
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to...
3
1200
by: Guy Bradley | last post by:
write one function (for navigation) and call it in multiple asp.net pages? - i would use an include file as i do in asp but i gather this isnt the best way of doing it... suggestion? - thx in advance
55
12784
by: Steve | last post by:
I have to develop several large and complex C++ hardware test programs that should work under DOS, most likely with 32-bit DOS extender. Development workstation OS would be Microsoft XP. Quite some time ago I worked in DOS, with Borland BC++ 4.1. I do not have it any more. Which compiler would you recommend me now? Which ones support serious...
0
7894
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7825
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7933
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8191
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5700
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1431
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.