Hyrvao 0 Posted January 25, 2008 My problem is that I set swedish language as default, but when I come into the site.. it's still english, no idea why. I've changed the swedish and it works fine so I don't really see where the problem is. Is there any other place I must change also? I've set currencies to swedish as default. Thanks Hyrvao Share this post Link to post Share on other sites
hari_shyam 0 Posted January 27, 2008 My problem is that I set swedish language as default, but when I come into the site.. it's still english, no idea why.I've changed the swedish and it works fine so I don't really see where the problem is. Is there any other place I must change also? I've set currencies to swedish as default. Thanks Hyrvao Hi Hyrvao Do one thing.. clode the window/browser refresh the session and try again.. i think it will work then.. cos the language is stored in the session variables i think you will need to recreate the session for the default language to chip in. Hari Share this post Link to post Share on other sites
birddogsgarage 0 Posted March 5, 2008 Ive been trying to find the same solution for days Im not really sure what the default language setting is for because application_top.php tells it to get the browser language if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) { $lng->set_language($HTTP_GET_VARS['language']); } else { $lng->get_browser_language(); } So oyu need to change that code so it doesnt use the browser language but instead use the default language if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) { $lng->set_language($HTTP_GET_VARS['language']); } else { //$lng->get_browser_language(); $languages_query = tep_db_query("select configuration_value from configuration where configuration_key='DEFAULT_LANGUAGE'"); $defLan = tep_db_fetch_array($languages_query); $lng->set_language("$defLan"); } Worked for me, Hope it helps you out. Share this post Link to post Share on other sites
the2003s 0 Posted June 3, 2008 Ive been trying to find the same solution for days Im not really sure what the default language setting is for because application_top.php tells it to get the browser language if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) { $lng->set_language($HTTP_GET_VARS['language']); } else { $lng->get_browser_language(); } So oyu need to change that code so it doesnt use the browser language but instead use the default language if (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) { $lng->set_language($HTTP_GET_VARS['language']); } else { //$lng->get_browser_language(); $languages_query = tep_db_query("select configuration_value from configuration where configuration_key='DEFAULT_LANGUAGE'"); $defLan = tep_db_fetch_array($languages_query); $lng->set_language("$defLan"); } Worked for me, Hope it helps you out. Yep, I had the same problem, and this solution works for me. Thanks birddogsgarage! Share this post Link to post Share on other sites
mevdev 0 Posted June 27, 2008 This worked for me so well it sped up my server 3x. It is amazing how much faster it is now. I only realized this because I went through my /var/logs/httpd/error_log looking for other things. Nice fix, Mevdev Share this post Link to post Share on other sites
jo3y 0 Posted March 6, 2009 me too.. i got same problem with that i hope this working in my site by the way thanks for this Share this post Link to post Share on other sites
ignaciot 0 Posted March 20, 2009 And worked for me too. Thanks a lot Birddogsgarage! Share this post Link to post Share on other sites
monika 0 Posted March 20, 2009 here can you suggest me the full code in php to be implented for the language translater in the site :rolleyes: monika Monika Share this post Link to post Share on other sites
micke salloum 0 Posted October 9, 2018 And worked for me too. I am on Oscommerce 2.3.4 Thanks a lot Birddogsgarage! Share this post Link to post Share on other sites
♥raiwa 1,472 Posted October 11, 2018 You do not need to retrieve the configuration constant "DEFAULT_LANGUAGE" by sql query. It is directly available and defined at this point in application_top.php. Just do this: if (isset($_GET['language']) && tep_not_null($_GET['language'])) { $lng->set_language($_GET['language']); } else { $lng->DEFAULT_LANGUAGE; } About Me: http://forums.oscommerce.com/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Share this post Link to post Share on other sites