Skip Navigation

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

Problem:
The client needed to change the language code for Estonian from "ET" to "EE" in WPML and encountered issues with string translations not working for the custom "EE" language. Additionally, the client was unable to delete the original Estonian language to set the "Default locale" to "et" because it already existed in the database.

Solution:
We advised the client to:
1. Re-add Estonian from the WPML language list.
2. Change the default locale of the re-added Estonian to any value other than "et".
3. Set the default locale for the custom Estonian ("EE") to "et".
4. Remove the WPML Estonian language.
This process should not create errors and should allow the client to use the "EE" code for Estonian without issues with string translations.

Please note that this solution might be outdated or not applicable to your case. If you're experiencing similar issues and the provided solution does not resolve them, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us for further assistance.

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 Laura 9 months, 1 week ago.

Assisted by: Laura.

Author Posts
February 12, 2024 at 6:51 am #15291056

aigarsM

Hi,

I'm encountering an issue with WPML's language settings and would appreciate your assistance. Here's an overview of the problem:

First, I created the Estonian language (a secondary language) and translated all posts into that language. However, it turns out that WPML outputs the Estonian language code as "ET", but I needed it to output "EE" (the country code). As I understood it, I needed to create a new custom language that would map with WPML's Estonian (https://wpml.org/faq/how-can-i-assign-or-change-language-code-to-existing-content/).

I did that (hidden link), but I noticed that strings are not being translated via string translation for "EE", FYI it happens only for "EE" (hidden link).

I suspect this is because I have set WPML -> Languages -> "Edit Languages" -> Custom Estonian ("Igauņu") -> "Default locale" as "ee", not "et" (hidden link).

But I can't set "Default locale" as "et" because the original Estonian is still around, and it throws an error that a language with that "Default locale" already exists (hidden link).

So now I'm trying to delete the original Estonian via WPML -> Languages -> Estonian -> "X" (hidden link).
It took a couple of tries, but now almost all posts and taxonomies are deleted. The problem is that when I try to press "X" again and press "Yes, delete all 'Estonian' translations", it starts to delete all Estonian posts but quickly stops, and no posts are deleted (hidden link).
It is worth noting that posts are not being deleted in the background. I have tried to delete the posts for a few days now, and nothing is happening.

I don't know if deleting the original Estonian language and setting "Default locale" as "et" will help, but right now, I can't test it because I can't delete the original Estonian.

February 12, 2024 at 11:41 am #15292797

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hi,

thanks for contacting us.

I can tell you already that in your specific case deleting Estonian won't help. This is because when you delete a language in the language table, you're not deleting it in the database, and in the database the default locale is still set.
Therefore, even if you delete the ET Estonian, when you'll try to set the same locale for EE Estonian, WPML will tell you it can't be done because there's already a language with that default locale.

The correct procedure is
- re-add Estonian from the WPML list
- change the default locale to anything you'd like
- set the default locale for custom Estonian to et
- remove WPML Estonian

This shouldn't create errors.

Please check if this solves the issue, if not we'll continue to investigate

February 12, 2024 at 11:59 am #15292964
aigarsM

Hi,

Thank you. The core issues—that string translation doesn't work for EE and that I can't change the default locale—have been fixed. I could mark this ticket as resolved, but before I do, could you help me understand why I can't delete the original Estonian language? The first time I pressed "Yes, delete all 'Estonian' translations", it took much longer and deleted many posts. But now, it just closes the popup modal and pretends that it has deleted the language, even though that is not the case.

New threads created by Laura and linked to this one are listed below:

https://wpml.org/forums/topic/unable-to-delete-a-language/

February 12, 2024 at 4:52 pm #15294144

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Since the main issue is solved, I split the ticket and we can close here.