Reputation: 3058
I am currently developing a multi-language site using Zend Framework.
The system will pick a language for the user when he enters our site. If he doesn't like the language chosen by our system, he can choose another language.
What is the best way to remember which language the user is chosen?
Upvotes: 2
Views: 576
Reputation: 8483
As stated below; use sessions and cookies first then revert back to guessing the users preferred language. If the user has a login, store the information in the database attached to the user. A language Id maybe.
Add language checking code that checks settings in this order:
user profile(DB) session cookies approximate
On manual change, update all levels e.g. db, session and cookies.
Upvotes: 4
Reputation: 39198
User preferences if he has a profile on the site, session & cookie otherwise.
Bonus: are you using the Accept-Language HTTP Header to determine a new user's preferred language ?
Upvotes: 1