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
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Long Nguyen 5 months, 2 weeks ago.

Assisted by: Long Nguyen.

Author Posts
June 12, 2024 at 3:36 am #15729249

Emaar

Background of the issue:
We need to update hreflang code for SEO reasons on our site hidden link. We won't be changing the default locale or the language code. We have automated translations running by hidden link.

Symptoms:
NA

Questions:
Do we have to make any changes for mapping as we are changing locale or language code?

June 12, 2024 at 3:53 am #15729270

Long Nguyen
Supporter

Languages: English (English )

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

Hi there,

Thank you for contacting WPML support, I’m happy to help you with this issue.

I'm afraid that there isn't an option to change the hreflang code without changing the language code. You can try to use the filter hook "wpml_hreflangs" to customize the hreflang code in the frontend. Refer to this ticket
https://wpml.org/forums/topic/multiple-hreflang-tags-for-one-language-and-one-url/

But please notice that, this is the custom code. I would like to inform you that helping you with custom code, is out of the scope of WPML.
If you are not able to accomplish this, I would recommend you contact one of our certified partners who will be more than happy to help you with this. In this link, you will find a list of our certified partners: https://wpml.org/contractors/

Looking forward to your reply.
Thanks

June 12, 2024 at 4:11 am #15729277

Emaar

I can see option in WPML Languages to update hreflang.

I want to change hreflang from `ae-us` to `ae-ae`

untitled.png
June 12, 2024 at 4:23 am #15729324

Long Nguyen
Supporter

Languages: English (English )

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

Hi,

Ah yes, you can go to WPML > Languages > Site languages > Edit languages and update the hreflang. It won't affect the language code and language mapping that you are using.

Refer documentation https://wpml.org/documentation/support/adding-hreflang-wordpress/

Let me know how it goes.

The topic ‘[Closed] Regarding changing hreflang without changing locale or language code’ is closed to new replies.