This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 8 replies, has 2 voices.

Last updated by Riffaz 2 weeks, 5 days ago.

Assigned support staff: Riffaz.

Author Posts
September 21, 2019 at 6:10 am #4615471

simonG-8

Hi, I created a website with 5 languages and now I removed 3 languages.

1- I still can see in the database tables : "icl_string_*" the languages that I have removed, how can I clean those tables safely ?

2- After deleting a language, WPML will keep adding record for this language ?

Thank you

September 22, 2019 at 6:11 am #4617363

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

Currently WPML does not have a functionality to remove a deleted custom language records database-wide. This is in place to avoid any kind of data loss in case the language is deleted by mistake. The only way to completely remove a custom language's traces from WordPress and WPML tables is resetting the entire installation.

And, you can use this sql to remove everything related to the specific languages.

DELETE FROM `wp_icl_translations` WHERE language_code = 'ja';
DELETE FROM `wp_icl_translations` WHERE language_code = 'fr';

This will remove all Japanese and French inactive contents in one step.
You have to change the language code to the language you want.

After deleting a language, WPML will keep adding record for this language ?
- no, this was already added.

I still can see in the database tables : "icl_string_*"
- please show a screenshot of this and I will check this with our developers and will get back to you.

Let me know if you need anything else regarding this.

Regards,
Riffaz.

September 22, 2019 at 7:09 am #4617385

simonG-8

Hi, but in this table wp_icl_string_translations I have for a language "zh-hans" 21982 total records. This table should also be cleaned as well ?

Thank you

Simon

September 22, 2019 at 7:30 am #4617447

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

only if you use this code:

DELETE FROM `wp_icl_translations` WHERE language_code = 'h-hans';

your h-hans translations will be deleted.

Regards,

September 24, 2019 at 1:41 pm #4632027

simonG-8

Hi have a look at the attached screenshot

September 25, 2019 at 6:48 am #4636053

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

You have altered this code with your actual details, right?

DELETE FROM `wp_icl_translations` WHERE language_code = 'h-hans';

Go to WPML > Languages and add back the language you have deleted
Go to posts, pages, media, etc..
Do you see the contents?
Delete them manually if you see them.

Go to WPML > Support > Troubleshooting
Click on 'remove ghost entries' in clean up section: hidden link
Check your db.
This should remove them from DB as well.

Regards,

September 25, 2019 at 9:47 am #4637347

simonG-8

hi, I followed those instructions, receive the popup alert "Done", but this table still have all the data "wp_icl_string_translations" .

thanks

September 26, 2019 at 1:22 pm #4647179

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

I am checking this with our second tier support.
Please be patient till we get back to you again.

Regards,

October 2, 2019 at 11:50 am #4679915

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for your patient.

run this query:

DELETE FROM wp_icl_string_translations WHERE language = 'zh-hans';

I tested this in a fresh installation and it deleted everything related to the specific language.

Before do this, please take a backup in case if something goes wrong you can restore.

Regards,