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

Last updated by Dražen 1 year, 9 months ago.

Author Posts
September 12, 2023 at 8:28 am #14381403

angelaE

Hi, WPML team.

First of all, sorry if this is not the best option to tell this. I can't found how to post a normal support ticket in the forum.

We have a website that we are going to translate into several Spanish languages and we have added the Valencian language, which is similar to Catalan, but has some characteristics of the region.

We have added the language without any problem with its custom flag.

The problem appears once you have saved the new language, where it allows you to add the hreflang tag.

As we have already added Catalan previously, we cannot add the hreflang "ca" for Valencian, so it is not correct.

If you check this page, in the codes "2-letter ISO-639-1", both Catalan and Valencian appear with the same code. hidden link

My questions are the following:

Is there any reason that I don't know why all the hreflangs have to be unique?

Is there any way to make this change through a custom function?

It seems like an interesting idea to implement to add custom languages. In this list (see link above) I have seen that there are several languages and dialects sharing the same hreflang. Of course, for automatic translations from the browser it wouldn't be the best translation, but they could detect a translation close to reality.

Thanks for all your work.

Best regards.

September 13, 2023 at 8:36 am #14388081

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for contacting us.

I am afraid each language code needs to be unique for several reasons. One of them is since language code is used in URL example domain.com/ab/ if you have multiple same URLs it will work, the URL needs to be unique. Another is if it is the same text and the same language code, Google will probably flag it as duplicate content and it might be flagged.

For example, you can use URLs for English speakers in Ireland (en-ie), Canada (en-ca), and Australia (en-au) etc.

Hope this helps.

Regards,
Drazen

The topic ‘[Closed] Feature request – Allow the same hreflang in multiple languages’ is closed to new replies.