Jump to content

[SOLVED] Delete Unused Language in DataBase


PoOoOoZ

Recommended Posts

Hello, i have deleted 3 language (3,4 & 5) in the database (table ps_lang), because i was unable to make it in the backend (nothing when i tried to delete language). The associate lines for differents lang are still in the database, how can i tell to prestashop to refresh and remove all these lines ? (in ps_attachment_lang a ps_product_lang for exemple where there are 5 lines for every item)

Can someone know this problem and can help me ?

Thank You very much.

Link to comment
Share on other sites

  • 11 months later...

Hello , I am having the same issues, cannot delete a language in admin (Localization > Languages) I am using the latest 1.5.0.17 version. All files are CHMOD 777 and ownership is set correctly , still i cannot delete it. There is a message at top saying your htaccess must be writeable , i assume this is not connected to this, but this as well is set to CHMOD 777.

 

Any suggestions ?

Link to comment
Share on other sites

  • 2 months later...
  • 4 years later...

anyone who still have this issue

easy way to delete unused languages from database

 

1- run this query to get lang tables

SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.tables 
WHERE TABLE_SCHEMA='database_name' and TABLE_NAME LIKE '%_lang'; 

change database_name with your database name

2- copy tables name and do bulk edit via text editor like sublime text

each table name in a line

ada to the beginning of the line Delete from 

add to the end of line where id_lang=1

change 1 with the id of the lang you want to delete

so you will get something like this 

delete from ps_risk_lang where id_lang = 1;

delete from ps_stock_mvt_reason_lang where id_lang = 1;

delete from ps_supplier_lang where id_lang = 1;

delete from ps_supply_order_state_lang where id_lang = 1;

delete from ps_tab_lang where id_lang = 1;

delete from ps_tax_lang where id_lang = 1; 

3- copy past queries in phpmyadmin

 

that's it, it will delete all related unused translates from database

  • Like 1
Link to comment
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
×
×
  • Create New...