Monday, 15 April 2013

mysql - Php multilanguage: how store the active language? -



mysql - Php multilanguage: how store the active language? -

i'm building php switcher add together multilanguage capability site.

every content in mysql has language-specific text want retrieve according active language.

at beginning, thought build tailored table in mysql store languages status. example: italian 1 english language 0 ..where 1 means language active, , 0 means off.

every time user switch language, phone call table , alter language status. then, @ end of call, refresh page , php retrieve right contents.

this seemed thought till figured out languages status in mysql alter every time user switch. so, if user viewing site in italian, , other user switch english language @ same time, first user view english language well.

my question is: how store languages status specific user, avoiding alter languages status every other user ?

thanks lot

don't utilize database. set $_session variable instead (and don't forget phone call session_start() before modify it). (php manual)

php mysql multilingual multilanguage

No comments:

Post a Comment