473,795 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bilingual site, best practice?

Tim
I am doing a small asp webshop and want to make it atleast bi-lingual.
I have thought of a few ways to do this but would like to have a second
opinion on what you think is the best way.

I have browsed the Google archives and seen this question pop up a few
times before but never with any particulary good answers. For some
reason this doesn't seem like a hot topic.

I am not talking about the product information, that is already stored
in multiple languages in the database. I am asking about the other texts
on the webpage, the linknames, the introduction the page descriptions etc.

My current ideas are as follows:
1. Many small arrays in one big file.
I create an includefile that looks like this

Dim INTRO = ("En bra sida", "A good page")
Dim LINKS = ("Länkar", "Links")

This will be a large but not huge file that is included with every other
page. and I reffer to each text like this

response.write( INTRO(lang))

This will make it easy to maintain, easy to understand and fast but it
will possibly be a memmory hog?

2. The second alternative is similar but use a different includefile for
each aspfile on the site. This will improve the memmory problems but
will decrease the maintainability .

3. Load all the text to the application object.
In global.asa I load all the textarrays into the application object and
retrieve them from there in each subsequent page.
This will certainly improve memmory effisiency but instead I have to do
a number of lookups in the application object on each page, someting
like this in global.asa:

application("IN TRO") = ("En bra sida", "A good page")
application("LI NKS") = ("Länkar", "Links")

All the subsequent pages will then look like this:
response.write( application("IN TRO")(lang))

A little bit uglier code and certainly slower then the first alternative
but more memmory efficient.

4. Database
The website curently relies un Access databases (for a number of
reasons) and I could of course create a language database and do lookups
there all the time.
This would cause some overhead for all the lookups but the
maintainability would be very high, just one simple database to keep an
eye on and update.

Any pointers to discussions on the subject or information on "best
practice" in the asp community would be much appreciated. I am sure all
the solutions are doable I would ratehr get it right the first time
instead of changing it later.

Tim
Jul 22 '05 #1
2 1909
Actually it doesn't matter. The key point IMO is to define how you'll access
the needed text. IMO you shoudl't access directly to a variable but should
use a function with the resource "key". as an argument. After the
implemention of this resource retrieving function could be whatever you want
(and y'oull be abelt o change it at will).

Generally you'll have likely to balance between speed and memory. Keeping
this in memory will be much faster (but will use some memory note though
that you can predict the amount of memory you'll use).
Then the exact storage depends on wether you need to have this handled by a
developer of if the application administrator should be able to change
this.. Note that event if you are storing in the database you could "cache"
this information in memory.

Patrice

--

"Tim" <al@gahnstrom.s e> a écrit dans le message de
news:gR******** ***********@new sb.telia.net...
I am doing a small asp webshop and want to make it atleast bi-lingual.
I have thought of a few ways to do this but would like to have a second
opinion on what you think is the best way.

I have browsed the Google archives and seen this question pop up a few
times before but never with any particulary good answers. For some
reason this doesn't seem like a hot topic.

I am not talking about the product information, that is already stored
in multiple languages in the database. I am asking about the other texts
on the webpage, the linknames, the introduction the page descriptions etc.

My current ideas are as follows:
1. Many small arrays in one big file.
I create an includefile that looks like this

Dim INTRO = ("En bra sida", "A good page")
Dim LINKS = ("Länkar", "Links")

This will be a large but not huge file that is included with every other
page. and I reffer to each text like this

response.write( INTRO(lang))

This will make it easy to maintain, easy to understand and fast but it
will possibly be a memmory hog?

2. The second alternative is similar but use a different includefile for
each aspfile on the site. This will improve the memmory problems but
will decrease the maintainability .

3. Load all the text to the application object.
In global.asa I load all the textarrays into the application object and
retrieve them from there in each subsequent page.
This will certainly improve memmory effisiency but instead I have to do
a number of lookups in the application object on each page, someting
like this in global.asa:

application("IN TRO") = ("En bra sida", "A good page")
application("LI NKS") = ("Länkar", "Links")

All the subsequent pages will then look like this:
response.write( application("IN TRO")(lang))

A little bit uglier code and certainly slower then the first alternative
but more memmory efficient.

4. Database
The website curently relies un Access databases (for a number of
reasons) and I could of course create a language database and do lookups
there all the time.
This would cause some overhead for all the lookups but the
maintainability would be very high, just one simple database to keep an
eye on and update.

Any pointers to discussions on the subject or information on "best
practice" in the asp community would be much appreciated. I am sure all
the solutions are doable I would ratehr get it right the first time
instead of changing it later.

Tim

Jul 22 '05 #2
Tim
Patrice wrote:
Actually it doesn't matter. The key point IMO is to define how you'll access
the needed text. IMO you shoudl't access directly to a variable but should
use a function with the resource "key". as an argument.


That indeed sound right.

I will go for a function L with an identifier parameter and use
Application variables to store the texts for now.

Thanks

Tim
Jul 22 '05 #3

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

Similar topics

10
3263
by: Amittai Aviram | last post by:
This XHTML 1.0 Strict page -- http://www.studiolirico.org/docs/settimana2003.html has a bilingual title in Italian and English. The principle language of the page is Italian, so the <html> tag looks like this (w/o the space in the xmlns URL): <html xmlns="h ttp://www.w3.org/1999/xhtml" xml:lang="it" lang="it"> Within the body, I have English translations for all Italian text, and these are always contained within elements that bear the...
30
3526
by: Gustaf Liljegren | last post by:
I'm working with some semi-advanced tables with lots of decimal numbers in, and I can't get the alignment to work. http://www.algonet.se/~gustafl/temp/output_ib.html I want numbers aligned to the decimal point. The HTML 4 spec says User agents doesn't need to support 'char' and 'charoff', so I wonder if the problem is lack of support? If so, can the same results be achieved in another way?
64
4279
by: Dave | last post by:
A friend of mine pointed out the other day that certain elements on my web site are too small. But in most of what I publish, fonts are at default size or smaller, and my images are easy to see. I am viewing at 800x600 right now by the way, because that's what I can comfortably see. Times New Roman default pitch is what - 12px? With people increasing their screen resolutions, is it possible for "default size to ever become too small in...
136
9460
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 use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
9
1760
by: dale zhang | last post by:
Hi, Anybody here has experience to build a english/chinese web? The chap 15 in Developing Web Applications tells sth about how to do this, but I want to know more details. It seems detect and redirect are the way for me to do this. Does this mean I have to have image button on the main page to link to chinese pages? all chinese pages will duplicate english ones? the following is from the book,
4
1574
by: Bill Borg | last post by:
Hello, I have a large commerce app, hosted for several hundred companies (i.e. each "company" is a small business selling something through my site, independent of all the others). Each company has a unique ID (e.g. 12345), which is a primary key in the tables for products, customers, etc. That key also identifies company-specific customization of my site, such as text strings, various styles, etc.
5
3309
by: will | last post by:
I have a php/mysql site and I am wondering if anyone has suggestions about strategies for making it bilingual or resources on how to do this. I thought of one way which would be to replace the text with calls to a database which has all the text in it. But I would prefer to have a single file with phrases and then just be able to translate that single file into another language to produce a site in another language. Any ideas would be...
3
4471
by: jobs | last post by:
I have an English site I need to make available in Spanish. Ideally there will be a preset switch in the users profile to indicate they would like to see the site in Spanish. My first inclination is to make a copy of the site redirect them after the login. Outside of doing it this way, or purchasing/using third party products or controls that deal with localization and maybe use xml to drive those controls dynamically. Is their an...
5
1651
Jacotheron
by: Jacotheron | last post by:
I have a problem again. I have a 2 sites for one of my customers. The site is English and Afrikaans. The English site is parked on the Afrikaans site. The script should check to see if the page is accessed through the correct domain. If it is not accessed through the correct domain, it should redirect to the correct domain and create a cookie to always return to the correct domain. Here is an example: Someone enters the site through...
0
9673
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10448
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10167
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
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
3
2922
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.