Skip Navigation

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

Problem:
The client needed to change the default country codes for Malay, Simplified Chinese for China, and Traditional Chinese for Taiwan to /my, /cn, and /tw, respectively. They encountered an issue where the system indicated that the default locale already exists when trying to set the custom language settings.
Solution:
We recommended that the client should use a different language name and locale for the custom language. Specifically, for Malay, the client should use the locale

my_MY

. We provided guidance to follow our documentation on editing WPML's languages table, which can be found here:

After following our instructions, the client successfully added the custom language with the desired code.

If this solution doesn't look relevant to your situation, 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.

This topic contains 4 replies, has 2 voices.

Last updated by salaC 1 year, 3 months ago.

Assisted by: Long Nguyen.

Author Posts
January 2, 2024 at 3:12 am #15139990

salaC

Hello, my website includes Malay, Simplified Chinese for China, and Traditional Chinese for Taiwan. The default country codes in the WPML backend are /ms, zh-hans, and zh-hant, respectively. I need to change these codes to /my, /cn, and /tw. I tried to set the country code for Malay using the custom language settings, but it was not successful. It showed that the country code for that region already exists.

January 2, 2024 at 3:50 am #15139997

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi there,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

I can add a custom language Malay with the language code "my" as well. Please check the screenshot attached. You should use another language name and locale for the custom language, following the documentation https://wpml.org/documentation/getting-started-guide/language-setup/editing-wpmls-languages-table/

Look forward to your reply.
Thanks

Languages ‹ WPML Testing — WordPress 2024-01-02 10-37-23.png
January 2, 2024 at 7:08 am #15140285

salaC

Hi Long,

Thank you for the prompt response and the suggestion. I have attempted to add a custom language for my site with the code "my" as per your screenshot, but I encounter the message "The default locale already exists." Could you please advise on how to proceed when the system indicates that the default locale is already in use? I appreciate your guidance on this matter.

1704179183189.jpg
January 2, 2024 at 7:13 am #15140300

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

As I mentioned above, you should use another locale. Please try again with the default locale "my_MY" and see how it goes.

Look forward to your reply.
Thanks

January 2, 2024 at 7:34 am #15140312

salaC

Hi Long,

I’ve followed your instructions and used the locale "my_MY". It worked perfectly this time. I just wanted to say thank you for your assistance—it was exactly what I needed. Your support is greatly appreciated!