daquity36 Posted April 19, 2013 Share Posted April 19, 2013 If you use only one or two languages on your website, it is very inefficient and costly to have 5 separate entries for a category, product, attribute, etc. in the database. (one for each english, french, german, etc...) It is like increasing the size of your database by several times. Even if you disable languages in the Back Office, there are still entries made for other languages in the database. (e.g. when you add a product or category) If you want to completely disable languages so that only the data of the active language get stored in the database, go to classes/Language.php. Go to line 610 and find loadLanguages(). Change $result to the following: $result = $db->ExecuteS('SELECT * FROM `'._DB_PREFIX_.'lang` WHERE `active` = 1', false); //only load active languages!! That's it. Now your database's size is minimized and your server-side speed maximized. Link to comment Share on other sites More sharing options...
be_tnt Posted April 19, 2013 Share Posted April 19, 2013 Thx for this tip but I would suggest to override the Language class instead of modifying the core one Maybe you can suggest this modification on github too? Link to comment Share on other sites More sharing options...
daquity36 Posted April 19, 2013 Author Share Posted April 19, 2013 Yes, it is definitely better to override the language class rather than modify the core. Thanks for the suggestion. But then I have edited the core too much already XD As for suggesting the mod on Github, Prestashop is made to serve as much functionality as possible, so I don't think the staff will make this change. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now