Newbie asks about multi-lingual website strategies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm a noob so keep the comments to a noob's level please.

I am doing a website and my client wants the bulk of the text to be
bilingual (French and English).  The last site I did used php and mysql so I
am getting comfortable with that technology.  Typically I am using a single
php file and my menu constantly points to the same file with different id
options example "index.php?id=30" and I want to use the same idea to choose
a language example "index.php?lang=fr&id=30".  Pretty straight forward for
many of you folks but before I start reinventing the wheel I wondered if
anyone could offer any suggestions.  I have a couple of approaches in mind.

1: Session vars, I have never used this but it seems straight forward.
Drawbacks?
2: Cookies again not too big a deal, never used cookies either but it
doesn't seem to be mystifying however the fact that the user can turn
cookies off makes me not want to go this route.
3: Use the mysql database and log each ip address and record the preference
and maybe the last time on the site.  I am leaning in this direction because
I think it is the most robust but will it be slow?  First I have to get the
ip then I have to check to see if it is in my data base and then get the
language preference.  It would be great to have a standardized function that
I could use on all of my sites.  I live in a bilingual country (Canada) so
this could be a real selling point for my services.

Any any and all comments are welcome, it will be a learning curve no matter
which route I take so a little advice on the best direction pros cons would
be great.

And of course knowing that I will have many many thousands of people on my
site (hee hee) which option will perform best once I start accumulating
vistors.  That's one problem I see with the mysql solution, I think it may
start to be slow unless I start purging vistors who have not shown up in a
while or limit the number of entries.

Thanks,
Jeff

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux