Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi language website --swapping between languages--

Status
Not open for further replies.

aasterud

ISP
Aug 10, 2001
9
NO
Hi all,

I have an ASP webpage, and a database where I keep a table containing:

language, textname, text
------------------------
uk, welcome, Hi you all
uk, anothertext, Nice to see you
no, velkommen, Hei på deg
no, annentext, Hyggelig å se deg

On the page layout, I have a menu "choose your country", with UK and NORWAY as options. The idea is that if you're on the webpage looking at the uk text "welcome" you should be able to click on NORWAY and get the "no text velkommen". If you then follow a link from the page "no-velkommen" to the "no-annentext", you should be able to click UK from the menu and get the "uk-anothertext".

Clear so far? I'm using only one page, so it is like landing on index.asp?lang=uk&txt=welcome, follow the link to index.asp?lang=uk&txt=anothertext, and so on.

I considered using "go to related page" but I don't see how I can tell the page to use the actual URL, and only change the language...

Anyone out there that could help me out, please?

Thanks in advance,

Harry M. Aasterud
 
Well, it sounds like you just need to build up a SQL statement based on your querystring variables, so:

index.asp?lang=uk&txt=welcome

is your address.

dim sql, lang, txt
lang = request.queryString("lang")
txt = request.queryString("txt")
sql = "SELECT text FROM tableName WHERE textname = '" & txt & "' AND language = '" & lang & "'"

Now, when you execute that statement to create your recordset, it will contain the appropriate text.

Boy, if you're going to do the whole site that way, it's going to get complicated, not to mention slow. Wish I had a better suggestion for you, but I don't have any experience doing this type of thing.

good luck! :)
paul
penny.gif
penny.gif
 
Hi Paul,

This sound logical, yes. But the reason I'm using UltraDev is because of the easy interface. I know how to read the asp code, but I'm no hero in writing it. So I wonder if you could guide me step-by-step through the interface: what to select, what to create, etc. ?

Maybe to help you visualise the page: you'll find it at The default is the norwegian layout, and the variables to change this is:
?language=english&pagename=main or
?language=nederlands&pagename=main.

For now, I hard coded the link in the language menu to index.asp?language=whatever&pagename=main. This means that when you select another language, you start all over again, in the selected language. And that's the problem: I don't want a user to start all over again, but hop to the same page, other language.

If you would like to have the asp code, just let me know.

Hope you find the time to help me out. Thanks in advance.

Regards,

Harry
 
Sorry. Wish I could, but to be perfectly honest, I've never even seen UD4. I use DW and InterDev for my web developing efforts.

Just cruise this forum because alot of the questions can be answered in pure ASP.

:-(
penny.gif
penny.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top