ccg_webshop Posted April 22, 2005 Share Posted April 22, 2005 When using an english language browser to surf to my new OsCommerce shop, you'll see the following error message: Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /var/www/k/kralenfan.nl/HTML/includes/application_top.php on line 285 Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php') in /var/www/k/kralenfan.nl/HTML/includes/application_top.php on line 285 The strange thing is that this error only occurs when using an English browser. When surfing to my shop in my native language browser (Dutch), everything works fine. In my admin I removed all languages after installing Dutch, but this useually doesn't produce any problems. What could be the issue? Link to comment Share on other sites More sharing options...
boxtel Posted April 22, 2005 Share Posted April 22, 2005 When using an english language browser to surf to my new OsCommerce shop, you'll see the following error message: Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /var/www/k/kralenfan.nl/HTML/includes/application_top.php on line 285 Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/lib/php') in /var/www/k/kralenfan.nl/HTML/includes/application_top.php on line 285 The strange thing is that this error only occurs when using an English browser. When surfing to my shop in my native language browser (Dutch), everything works fine. In my admin I removed all languages after installing Dutch, but this useually doesn't produce any problems. What could be the issue? <{POST_SNAPBACK}> check your language settings because it now tries to open .php (which ofcourse does not exist) and it should try to open english.php Treasurer MFC Link to comment Share on other sites More sharing options...
ccg_webshop Posted April 22, 2005 Author Share Posted April 22, 2005 My language is set at Dutch and I completely deleted all other languages, including english. Should I reinstall it? Link to comment Share on other sites More sharing options...
boxtel Posted April 22, 2005 Share Posted April 22, 2005 My language is set at Dutch and I completely deleted all other languages, including english. Should I reinstall it? <{POST_SNAPBACK}> dutch is set as default language ? Treasurer MFC Link to comment Share on other sites More sharing options...
ccg_webshop Posted April 22, 2005 Author Share Posted April 22, 2005 dutch is set as default language ? <{POST_SNAPBACK}> Yes, and it is now the only language I am able to select, since I deleted all others. Link to comment Share on other sites More sharing options...
boxtel Posted April 22, 2005 Share Posted April 22, 2005 Yes, and it is now the only language I am able to select, since I deleted all others. <{POST_SNAPBACK}> so to be clear : you have as language settings : name : nederlands code : nl image : whatever directory : whatever sort order : 1 set as default : true yes ? Treasurer MFC Link to comment Share on other sites More sharing options...
ccg_webshop Posted April 22, 2005 Author Share Posted April 22, 2005 Yes, only it's called "dutch" everywhere and not "nederlands". Link to comment Share on other sites More sharing options...
boxtel Posted April 22, 2005 Share Posted April 22, 2005 Yes, only it's called "dutch" everywhere and not "nederlands". <{POST_SNAPBACK}> that is strange. normally when a person has a browser language you do not support, they get the default language. you could test what happens in application top. there is some code "like" this : if ($given_language != '') { $lng->set_language($given_language); } else { $lng->get_browser_language(); you could add before and after it this test code : if ($browser_ip == 'your_ip_address') { echo $lng->language['directory']; } then you see 1, what the default is and 2, what is coming from the browser settings. use your ip address so only you see the result. Treasurer MFC Link to comment Share on other sites More sharing options...
boxtel Posted April 22, 2005 Share Posted April 22, 2005 that is strange. normally when a person has a browser language you do not support, they get the default language. you could test what happens in application top. there is some code "like" this : if ($given_language != '') { $lng->set_language($given_language); } else { $lng->get_browser_language(); you could add before and after it this test code : if ($browser_ip == 'your_ip_address') { echo $lng->language['directory']; } then you see 1, what the default is and 2, what is coming from the browser settings. use your ip address so only you see the result. <{POST_SNAPBACK}> ofcourse if you only support dutch, change $lng->get_browser_language(); to $lng->set_language('nl'); Treasurer MFC Link to comment Share on other sites More sharing options...
ccg_webshop Posted April 22, 2005 Author Share Posted April 22, 2005 It sounds a bit complicated and I wonder how that would solve my problem. Woudn't it be easier to make a copy of the dutch folder, rename to english and re-install that language? Link to comment Share on other sites More sharing options...
boxtel Posted April 22, 2005 Share Posted April 22, 2005 It sounds a bit complicated and I wonder how that would solve my problem. Woudn't it be easier to make a copy of the dutch folder, rename to english and re-install that language? <{POST_SNAPBACK}> well, that depends on whether you want to solve the problem or the symptom. If you copy dutch to english then from now on you will have to maintain 2 sets of language files. And what happens if someone has a spanish as their browser language ? Treasurer MFC Link to comment Share on other sites More sharing options...
ccg_webshop Posted April 22, 2005 Author Share Posted April 22, 2005 well, that depends on whether you want to solve the problem or the symptom. If you copy dutch to english then from now on you will have to maintain 2 sets of language files. And what happens if someone has a spanish as their browser language ? <{POST_SNAPBACK}> First of all, that is unlikely to happen as my site target a dutch / belgian audience only and secondly, I'm not a technician and I don't really get what I am testing when adding that code to the file. What information will it give me? Link to comment Share on other sites More sharing options...
ccg_webshop Posted April 23, 2005 Author Share Posted April 23, 2005 Any ideas anyone? I'dd like to work on this tomorrow. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.