Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is attempting to create a new language with the code "EU" in WPML but receives an error message stating "The Language code already exists". This issue persists even after deleting an old language with a similar code and clearing the cache.

Solution:
We have identified that the code "EU" is already in use for the Basque language in the WPML database. To prevent this issue, we recommend checking the

wp_icl_languages

table in the database to view all 70 preset languages and their codes, ensuring that the new language code does not duplicate any existing ones.

If you're experiencing this issue, we recommend you:
1. Access your website's database.
2. Locate the

wp_icl_languages

table.
3. Review the list of preset languages and their codes to avoid duplicates.

Please note that the solution might be irrelevant if it's outdated or not applicable to your case. If the problem persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by seanH-16 1 year, 2 months ago.

Assisted by: Ilyes.

Author Posts
February 6, 2024 at 4:53 pm #15273178

seanH-16

Tell us what you are trying to do?
I’m trying to create a new language to change the code from a previous language,
My current language code is "EUR" and I want to create a new one using only "EU".
But when i'm trying to create that new one, I get an error saying " The Language code already exits".
I thought the problem was because the current language starts with the same letters, so I created a new language using a completely different code, duplicated all the content there, deleted the old "EUR" language and cleared the cache.
Then I tried to create the language again with the "EU" code, but I'm still getting that error saying "The Language code already exits".

This same error happened with other 2 languages, and after some trials they worked, but i've spent a lot of time trying to make the EU work with no luck.
I’m doing all these changes on a staging site before making the change on our production site.

What is the link to your site?
hidden link

Thank you!

February 7, 2024 at 4:37 pm #15277863

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

I would like to ask for temporary access to your test site’s wp-admin.

Kindly provide me with the steps on how to replicate the problem. I need to know what parameter you used to create this language and for what purpose.

It is important to note that you should back up your site and database before proceeding, and you can use a plugin like Duplicator for this purpose. Here’s a link to the plugin: http://wordpress.org/plugins/duplicator/

If you do not see the form below, please do not enter your credentials as they will be publicly exposed:

hidden link

For your privacy and security, please ensure that you make your reply a private one.

Best regards,

February 8, 2024 at 3:01 pm #15281925

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

After checking your Database, it turns out that EU is used for the language Basque : hidden link

You could go to your database and check the table wp_icl_languages to see all the 70 preset languages with their codes to avoid duplicates.

Ind is done for Indian-English is that right? which also can be found in the same database table.

I hope that answers your questions,

February 8, 2024 at 9:33 pm #15283481

seanH-16

Thanks for your help, Ilyes!

Yes, I see that "basque" language with the code "eu" on the database.
To add the new language we want using the same code, do we have to delete that "basque" language from phpMyAdmin? And then add the new language with WPML on WordPress?

Thank you! Best regards,