473,394 Members | 1,770 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to do internationalization in classic ASP (w/o dynamic includes)?

I'm using classical ASP on IIS 6.0 (Windows 2003 Server). What I want
to do is to serve the same pages in two different languages without
using two different folders and doubling my same ASP code and changing
the string values.

What I need is DYNAMIC INCLUDE functionality similar to PHP, however I
know that I don't have it in ASP. Moreover Server.Execute is useless
because it doesn't have a functionality like an include file, calling
some file (that includes language string constants) conditionally is
not useful because when the file is executed its scope is over and I
cannot reach the constants or variables defined in that file.

What do you advise in such a situation? I need two groups of
constants, one for English, one for Turkish, like:

english.asp
---------------
lngWeek = "Week"
lngEdit = "Edit"
lngSubmit = "Submit"
..
..
..
turkish.asp
---------------
lngWeek = "Hafta"
lngEdit = "Düzenle"
lngSubmit = "Gönder"
..
..
..
and use the same constant throughout my other ASP pages. Now, you may
advise me to use database, yes I can store the data above in a
database but everytime an ASP page is rendered a connection must be
opened to database and I need loops (imagine I more than a few hundred
string constatns) and control structures. The performance penalty
scares me.

How can such a system be implemented in classical ASP?

Thanks in advance.
Jul 19 '05 #1
2 4265
> What I need is DYNAMIC INCLUDE functionality similar to PHP, however I
know that I don't have it in ASP.


Have you seen http://www.aspfaq.com/2042 ?

You could also store your constants in a database table with three columns:
ConstantName, EnglishValue, TurkishValue, and then have a stored procedure
or function that takes your current locale as a parameter and returns the
constants as a single resultset or as output parameters. You really
shouldn't be so scared of making minimal calls to a database if it makes
your job easier. With the hardware we're using these days, it's not as
sacreligious as it used to be. I would bet that a large percentage of the
web sites you go to use the database not just for constants but for all of
the content as well, and the only ones that are slow are the ones that are
on a single node, old compaq server with 256 MB of RAM, using Access and
trying to serve 8 billion pages an hour (e.g. friendster.com). Anyway, you
should test the performance of a database solution, instead of just writing
it off based on assumptions and fear.

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #2
Thanks for the advice. We did a simple test and saw that it took about
roughly 55 seconds to make 3500 calls to SQL Server from within an ASP
page. This calculation let us to decide and we decided to use database
for storing our multilingual string constants.

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message news:<#7**************@TK2MSFTNGP12.phx.gbl>...
What I need is DYNAMIC INCLUDE functionality similar to PHP, however I
know that I don't have it in ASP.


Have you seen http://www.aspfaq.com/2042 ?

shouldn't be so scared of making minimal calls to a database if it makes
your job easier. With the hardware we're using these days, it's not as
sacreligious as it used to be. I would bet that a large percentage of the
web sites you go to use the database not just for constants but for all of
the content as well, and the only ones that are slow are the ones that are
on a single node, old compaq server with 256 MB of RAM, using Access and
trying to serve 8 billion pages an hour (e.g. friendster.com). Anyway, you
should test the performance of a database solution, instead of just writing
it off based on assumptions and fear.

Jul 19 '05 #3

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

Similar topics

9
by: Brian Kelley | last post by:
I have been using gettext and various utilities to provide internationalization for a wxPython application and have not really been liking the process. Essentially it uses a macro-style notation...
4
by: Gary Contois | last post by:
I have seen the discussion below of how to use dynamic includes to get the info into the page. This is very helpful but does not quite fit my issue. I am currently using an include to pull in a...
4
by: Patrick | last post by:
I have an ASP site with about 50 ASP files, all of which are currently including a common "includes.asp" file near the top of the file, responsible for generating the <HEAD/> section of the HTML ...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
0
by: Achim Domma (SyynX Solutions GmbH) | last post by:
Hi, I have a web app which is implemented as a single Asp.Net Control. This Control will run as a Sharepoint Web Part or as a standalone applikation. The structure of the web page of the...
1
by: sreemati | last post by:
Hi Everyone, I have newly started as a ASP developer. I have been working on some change request and was blogged down with dynamic includes. Eventually I had managed to figure out the problem and...
7
by: Ajinkya | last post by:
I have writen a program for a game called game.exe Now it includes a player part to which has to be a function to be writen by someone else. Now I want to provide this exe to some tester who...
12
by: Juan T. Llibre | last post by:
re: !I found an MSDN document that explains why what I'm trying to do should work Lee, From : http://www.w3.org/TR/REC-xml/ "A special attribute named xml:lang may be inserted in...
0
by: JGold1993 | last post by:
Hi, I am new to this forum. I have a question involving PHP dynamic includes, (I think). I am not the best at PHP, and I am surprised I have been able to run my website with PHP. But this is where...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.