Jump to content
NicolasW

Language error

Recommended Posts

Hi I have a problem while I try to access to my webshop  Parse error: syntax error, unexpected 'setlocale' (T_STRING) in /volume1/web/oscommerce/catalog/includes/application_top.php on line 286

 

and this is the lines in the file

 

283 // include the language translations
284 $_system_locale_numeric = setlocale(LC_NUMERIC, 0);
285  require(DIR_WS_LANGUAGES . $language . '.php'); web/oscommerce/catalog/includes/languages/français
286   setlocale(LC_NUMERIC, 'fr_FR.UTF-8'); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)

 

what's wrong here ?

Share this post


Link to post
Share on other sites
4 hours ago, NicolasW said:

web/oscommerce/catalog/includes/languages/français

Delete that.  Or put a // in front to comment it out. 

You should also restore line 286 to the original. 

setlocale(LC_NUMERIC, $_system_locale_numeric); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)

The way that you have it won't work correctly (bug #634).  But it's not causing your current problem. 


Always back up before making changes.

Share this post


Link to post
Share on other sites

Thank's for you answer but now I have an issue in the administration languages Warning: opendir(/volume1/web/oscommerce/catalog/includes/languages/french/): failed to open dir: No such file or directory in /volume1/web/oscommerce/catalog/administrator/define_language.php on line 22

Share this post


Link to post
Share on other sites

Well, that warning literally tells you what the problem is.  There is no such directory as includes/languages/french/

Either create the directory (with the necessary contents), or if the name is wrong, edit the language to point to the right directory.  The place to edit it is admin > Localization > Languages

If that page won't allow you to edit it, you would have to edit it in something like phpMyAdmin.  It would be the directory column in the languages table. 


Always back up before making changes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×