thejerk Posted December 8, 2002 Share Posted December 8, 2002 I have 2 languages active in my shop, dutch and english. Have set default to dutch. DB contains tthis default value. But if i call the default catalog page it will give me the english shop. Can anyone give me hints?? Txs, Ron Link to comment Share on other sites More sharing options...
belladonna Posted December 8, 2002 Share Posted December 8, 2002 Try this: http://www.oscommerce.com/community.php/bugs,656 Take care!:) Link to comment Share on other sites More sharing options...
thejerk Posted December 9, 2002 Author Share Posted December 9, 2002 Thank you for your reply, I did try it, but was unsuccesfull, probably beacause i am not very knowledgable in php......and i can only follow exact descriptions, like replace this line with this one......and i probaly removed to much or to little...... If you can help, i would be very happy :D txs ron Link to comment Share on other sites More sharing options...
belladonna Posted December 9, 2002 Share Posted December 9, 2002 Basically as it says ... replace the get_browser_language function in "catalog/includes/classes/language.php": function get_browser_language() { $this->browser_languages = explode(',', getenv('HTTP_ACCEPT_LANGUAGE')); $size = sizeof($this->browser_languages); for ($i=0; $i<$size; $i++) { reset($this->languages); while (list($key, $value) = each($this->languages)) { if ( (eregi('^(' . $value[0] . ')(;q=[0-9].[0-9])?$', $this->browser_languages[$i])) && ($this->catalog_languages[$key]) ) { $this->language = $this->catalog_languages[$key]; break 2; } } } } with: function get_browser_language() { $this->browser_languages = explode(',', getenv('HTTP_ACCEPT_LANGUAGE')); $languages_query = tep_db_query("select configuration_value from configuration where configuration_key='DEFAULT_LANGUAGE'"); $defLan = tep_db_fetch_array($languages_query); $this->language = $this->catalog_languages[$defLan['configuration_value']]; } Take care!:) Link to comment Share on other sites More sharing options...
thejerk Posted December 9, 2002 Author Share Posted December 9, 2002 Allright.....many thanks....it works and seeems to solve another problem i had as well. Great!! :lol: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.