Hyrvao Posted January 25, 2008 Share 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 Quote Link to comment Share on other sites More sharing options...
hari_shyam Posted January 27, 2008 Share 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 Quote Link to comment Share on other sites More sharing options...
birddogsgarage Posted March 5, 2008 Share 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. Quote Link to comment Share on other sites More sharing options...
the2003s Posted June 3, 2008 Share 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! Quote Link to comment Share on other sites More sharing options...
mevdev Posted June 27, 2008 Share 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 Quote Link to comment Share on other sites More sharing options...
jo3y Posted March 6, 2009 Share 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 Quote Link to comment Share on other sites More sharing options...
ignaciot Posted March 20, 2009 Share Posted March 20, 2009 And worked for me too. Thanks a lot Birddogsgarage! Quote Link to comment Share on other sites More sharing options...
monika Posted March 20, 2009 Share 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 Quote Monika Link to comment Share on other sites More sharing options...
micke salloum Posted October 9, 2018 Share Posted October 9, 2018 And worked for me too. I am on Oscommerce 2.3.4 Thanks a lot Birddogsgarage! Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 11, 2018 Share 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; } Quote About Me: http://www.oscommerce.com/forums/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 Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.