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 thread is resolved. Here is a description of the problem and solution.

Problem:
I am trying to remove language from the database which says that the locale already exists. I added India as a language but instead of https://www.techbelt.com/hi/ I wanted to have https://www.techbelt.com/in/ the language is India English so href was en-IN.

Solution:
Running this query:

DELETE FROM `wp_icl_translations` WHERE language_code = 'en-in'

and clearing the WPML cache did the job.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by matthewH-18 2 months, 1 week ago.

Assigned support staff: Radu.

Author Posts
August 8, 2019 at 12:48 pm #4363067

matthewH-18

I am trying to: remove language from the database which says that the locale already exists
I added india as a language but instead of hidden link I wanted to have hidden link the language is India English so href was en-IN I followed instructions on the post to clear the cache etc on the rouble shooting page and also ran the SQL query and get the error below
DELETE FROM `wp_icl_translations` WHERE language_code = 'en-in'
MySQL said: <image004.png>
#1146 - Table 'tb_com_us.wp_icl_translations' doesn't exist

I want to add back in as a custom language india with the in prefix and href and it throws an error of locale already exists

Link to a page where the issue can be seen:hidden link

I expected to see:

Instead, I got:

August 8, 2019 at 1:18 pm #4363189

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Matthew,

Thank you for reaching out the WPML support!

Can you tell me why do you want to remove a language from the database, please? Also, where did you get that SQL query from? I just want to understand first what would you like to do on your website and see if there's an easier and safer way to do that.

Thanks,
Radu

August 8, 2019 at 1:40 pm #4363343

matthewH-18

Hi I cant add india as a custom language it says locale already exists

August 8, 2019 at 1:49 pm #4363465

matthewH-18

My issue is resolved now. Thank you! fixed by running query and clearing the caches in wpml