PrestaShop/PrestaShop — pull request #177 by nsorosac (2013-01-14 14:59:06+00:00)
Title: [-] FO : moved default language detection from Tools::setCookieLanguage to Cookie::update

The default language detection from Tools::setCookieLanguage is never processed because Cookie::$id_lang is populated before this method is called.

To allow automatic language detection base on the client HTTP headers, I moved the language detection code from Tools::setCookieLanguage to Cookie::update.

To test this feature : access the base URL of a multilingual PrestaShop 1.5.3.1 ; without language suffix, and let the default language redirection happen: without this fix, PS_LANG_DEFAULT is always used. With this fix, the browser language is used (fallback = default language).