multilanguage site
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!
IanD posted this at 17:27 — 21st September 2007.
They have: 222 posts
Joined: Sep 1999
You could set a session variable to hold the language, and then display the content based on the variable.
pr0gr4mm3r posted this at 04:32 — 22nd September 2007.
He has: 1,502 posts
Joined: Sep 2006
Probably the easiest way to learn would be to look at a script like OSCommerce and see how they handle internationalization.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.