Mariano López wrote on Saturday 12 July 2003 12:10:
I'm trying to make a multilanguage website. When the user enters the site,
I want to detect the language and automatically make a redirection. How
can I do this? And how should I organize my data base so the user can
switch languages easily?
If you run Apache or any capable web server, then you can leave the client
language detection and preference to it and let it serve appropriate
file(s). See more in Apache docs.
Then, based on which file is served, set language preferences in your PHP
app and allow change back and forth. As far as separating data, make sure
all language-specific content is defined separately from your main
application, and include() language-specific include files (containing
appropriate variables and language-specific content) in each script that
outputs or otherwise processes said content.
Depending on complexity of your application, and variety of languages this
could be anywhere from very simple to somewhat challenging.
--
Business Web Solutions
ActiveLink, LLC
www.active-link.com/intranet/