Skip Navigation

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

Problem:
The client was unable to add Dutch (Belgium) with the locale code 'nl_BE' to their WPML languages, receiving an error that the default locale already exists, despite it not being visible in the WPML > Languages > Add / Remove languages section.
Solution:
We recommended the client to check their database table

_icl_languages

for any entries with a default locale set to 'nl_BE'. Upon inspection, it was found that the locale should have been 'nl_NL'. The client corrected these values in their database, which resolved the issue and allowed them to add Dutch (Belgium) as a custom language.

If this solution does not apply to your case, or if it seems outdated, 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 issues persist, 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 4 replies, has 2 voices.

Last updated by Bobby 9 months ago.

Assisted by: Bobby.

Author Posts
May 8, 2024 at 10:39 am #15605528

adrienR-5

Hello,

I'm a web developer and I'm working on a client website (we both have our own WPML license)

I would like to add the Dutch (Belgium) language.
Code: nl-be
Default locale: nl_BE
Hreflang: nl-be

But it saying "The default locale already exists.": hidden link

But under WPML > Languages > Add / Remove languages, we don't have any Dutch (belgium), nor a nl-be code, I inspected the code: hidden link

This is the languages that I have currently: hidden link

I added French (Belgium): fr_BE (default locale) and French (Canada): fr_CA (default locale) as custom languages but that's it.

I added Dutch previously but we need nl-be so I deactivated it and delete all translated content.

Can you help me please set up Dutch (Belgium) as custom language?

Thanks!

May 8, 2024 at 11:45 pm #15608000

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

Hi,

I did a quick test and added the default locale nl_BE OK, a pre-loaded language does not use it.

Please go to your database table _icl_languages and scan through it, do you see any language listed with a default locale set to nl_BE?

(most likely will be found on the second page)

May 9, 2024 at 8:51 am #15609474

adrienR-5

Hi Bobby,

Yeah I found this row, can I safely delete it?

markuphero-1nc8BSBBVj10BbGkFrpo.png
May 9, 2024 at 9:19 am #15609613

adrienR-5

So I checked on another WPML fresh install and I saw that this line should have default_locale as "nl_NL" and tag as "nl", so I just changed those values inside my database.

Now I can add my custom language "Dutch (Belgium)" as "nl_BE"

May 9, 2024 at 7:30 pm #15612258

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-08:00)

That is correct, it should be nl_NL I have verified with my test install as well.

Glad that you were able to resolve the issue!