Background of the issue:
I am trying to delete the 'leftovers' of the default English en_US, but the loading icon spins indefinitely, and no leftovers are deleted. It worked fine for other languages. Additionally, I created and deleted the custom language en_gb. When I try to create it again, it says it still exists. That's because it remained in the PHPadmin database under the 'wpcb_icl_languages' table. I had to delete that entry manually from the database, so that I could recreate that language from the admin.
Symptoms:
1) When I try to delete the 'leftovers' of the default English en_US, the loading icon spins indefinitely, and no leftovers are deleted. It worked fine when I tried to remove 'leftovers' for other languages.
2) I created a custom language en_gb from the admin, and then deleted it. Then I tried to create it again but it says it already exists. In fact, it remained in the PHPadmin database under the 'wpcb_icl_languages' table, which is causing the error when I try to recreate it in admin. I had to delete that entry manually from the database, and then the admin allowed me to create it again.
Questions:
Why does the loading icon spin indefinitely when deleting 'leftovers' of the default English en_US?
How can I recreate a custom language after deletion, without manually deleting it from the database?
1) Please check if there are any errors in your browser's JavaScript console when deleting via the "x" icon. You can do this by right-clicking on the site, selecting Inspect, and navigating to the Console tab.
2) Try renaming the language by adding something like "2" in the language table. This way, you can avoid conflicts when re-adding it.