Hello all! I want to construct a multi-language site. I have my data stored in a database and I wanted to know if there is a way of me knowing which language the user sees. Imagine having a little flag on top of the page and when tha users presses it, he/she will see the data in english or in german or in greek etc... How can I keep track of the language though? If, for example, tha user selects ENGLISH in index.html, and then browses through the entire site, how can I know in every page, that I must retrieve the english data from my database? Thank you!
For .Net there is native support via cultureinfo and localisation and a google will bring up a lot of good tutorials For classic ASP the easiest way is to simply set either a session variable or cookie containing their preferred language and pick it up on each page load to determine which language to show.
I think cookie is better, you can use cookie next day also. if session, close and open window, you must select language again. so..
I have plenty of friends who refuse to visit sites that even try to store cookies. Personally, I block any cookies that aren't set to expire with this browser session. And there are the people who are using cookie-less browsers. Why exclude them if you don't have to? The asp.net cultureinfo is a much better way to go. If you're still using classic asp...you might want to think about switching to asp.net. Classic ASP's been dead for, what, 7 years now? Or not. Whatever works for you. p.s. Yes, I know asp.net often just magically tries to set cookies for you. But why make it any more obnoxious than you have to?