Skip Navigation

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 3 replies, has 2 voices.

Last updated by Riffaz 4 years, 7 months ago.

Assisted by: Riffaz.

Author Posts
September 6, 2019 at 6:43 pm #4527141

trimorS

Hi,

I wanted to change the language code from chinese from /zh-hans to /cn and I went to WPML->Languages->Site Languages->Edit Languages and changed to hreflang from /zh-hans to cn.

Strangely this does not affect the link struktur and /zh-hans stays. How can I solve this?

September 8, 2019 at 8:00 am #4530745

Riffaz

Hi,

Thank you for contacting WPML support.

You can NOT change a default locale.
A complete list of Locale Code: hidden link
You can check what locales can be used for Chinese.

In your case, you can create a custom language if you do not see the locale you want there and set the locale as you want but when you use a locale that is not recognized by WPML you may experience some SEO issues.

If you still want to create the custom language with the URL code and locale you want please follow the steps explained here: https://wpml.org/forums/topic/adding-a-custom-english-language/#post-2790234

You can not do that for a pre-configured language.
Pre-configured languages : hidden link

Please note, this is not a limitation from WPML.
This is how WordPress works.

Let me know if you need anything else regarding this.

Regards,
Riffaz.

September 8, 2019 at 8:39 am #4530897

trimorS

Hi, thanks for the answer. Unfortunately I did not find the /cn locale, which is quite interesting because I saw many sides with the locale /cn. Why is that not possible in this case?

The custom language method seems a good opportunity but what do you mean by SEO issues? Could you clarify this a bit more?

Regards,

September 8, 2019 at 2:32 pm #4531865

Riffaz

Hi,

Unfortunately I did not find the /cn locale,
- yes, because there is recognized locale 'cn'

I saw many sides with the locale /cn.
- I think site you are seeing with /cn/ should have two site in two different directories

Why is that not possible in this case?
- because WordPress and WPML do not allow this.

The custom language method seems a good opportunity but what do you mean by SEO issues? Could you clarify this a bit more?
- google will crawl the language perfectly only if the language has a valid and recognized locale.

Regards,

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.