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.

Sun Mon Tue Wed Thu Fri Sat
- 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 -
- 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 2 months ago.

Assisted by: Nicolas V..

Author Posts
April 16, 2024 at 5:09 pm #15527385

Mason Grandusky

Tell us what you are trying to do?
So we need to update our Chinese language from ZH-HANS to just ZH. I can see that i will need to create and setup a new language for ZH, but what i am needing assistance with is how can we take our pages we have setup and translated for ZH-HANS and set them to the new ZH language.

Please advise.

What is the link to your site?
hidden link

April 16, 2024 at 5:30 pm #15527673

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

If you want to change the hreflang, you don't have to create a new language.

You can go to "WPML > Languages > Site Languages > Edit Languages" and change the hreflang for your Chinese language.

See screenshot: hidden link

April 16, 2024 at 5:37 pm #15527681

Mason Grandusky

Thank you i say that option but what i need to do is change it so that our urls go from

/zh-hans/page-name

to

/zh/page-name

How can we do this for all of our existing pages?

April 16, 2024 at 9:31 pm #15528325

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

In that case you're right, you will have to create a new language with a different language code because that's the language code that is used to build the URLs.

- Create a new custom language and map it to Chinese (Simplified - I think)
Ref: https://wpml.org/documentation/getting-started-guide/language-setup/editing-wpmls-languages-table/

Here you have 2 options:
1. Duplication
- Edit an actual Chinese page and duplicate it in your new custom language language
You can do it manually page by page or you can go to "WPML > Translation Management" to do it in bulk.
- Once all the content has been duplicated on your custom language and if needed, you can remove the original Chinese language.

2. Translation
- Giving that the custom language will be mapped to the same language then your actual Chinese, if you used our Advanced Translation Editor (ATE) to translate your pages before into Chinese. All the translations will be saved in our translation memory. So you should be able translate into your new custom language and the translation memory should use the previous translation.

The topic ‘[Closed] Changing Language HREFLANG tags’ is closed to new replies.