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 Chinese(Simplified) from "Zh-hans" to "zh", noting that there were no translated pages or posts in Chinese(Simplified).
Solution:
We informed the client that it is not possible to edit the language code of default languages. Instead, we recommended adding a new custom language for Chinese(Simplified) with the desired custom language code "zh". Since the client mentioned there was no content in Chinese(Simplified), they could duplicate the existing "Zh-hans" content to the new custom language "zh". We provided a link to our documentation for further guidance on how to assign or change language codes to existing content:
https://wpml.org/faq/how-can-i-assign-or-change-language-code-to-existing-content/

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If you find that this solution does not solve your issue, we highly recommend checking related known issues at https://wpml.org/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 do not hesitate to open a new support ticket with us.

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 1 reply, has 2 voices.

Last updated by Mateus Getulio 1 year ago.

Assisted by: Mateus Getulio.

Author Posts
May 6, 2024 at 1:19 pm #15597559

tropiconD

Hello,

I have Chinese languages for Chinese(Traditional) ie (Zh-hant) and Chinese(Simplified) ie (Zh-hans). I am okay with the first language code which is where all our translated pages are. But I need to set the Chinese(Simplified) code from "Zh-hans" to "zh". Note that there are no translated pages or post on the Chinese(Simplified).

Thanks

May 6, 2024 at 8:02 pm #15599147

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Welcome to WPML Support.

Please note that by design it is not possible to edit the language code of default languages.

However, you would be able to add a new custom language ( Chinese(Simplified) ) with your custom language code(zh).

Since you already have content in Chinese Simplified, you can duplicate the existent "Zh-hans" content in the new language "zh".

More details on that are in the next link:

https://wpml.org/faq/how-can-i-assign-or-change-language-code-to-existing-content/

Regards,
Mateus