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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
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 4 replies, has 1 voice.

Last updated by Nicolas V. 4 days, 15 hours ago.

Assisted by: Nicolas V..

Author Posts
November 14, 2024 at 10:41 am #16401657

erkkiM

Background of the issue:
I am trying to fix hreflang language issues on my website using the WPML plugin. The hreflang tag is generated by a multilingual plugin, not by the Yoast SEO plugin. I was advised to review a guide on hreflang and ensure the language codes are appropriate. I am using the WPML plugin and need help fixing the hreflang language issues. There should be a way to update the language in the WPML plugin. Link to a page where the issue can be seen: hidden link (site-wide problem)

/Yoast Support/
Thanks for getting in touch with the Yoast support team.

We would like to let you know that the hreflang tag is actually generated by a multilingual plugin and not by the Yoast SEO plugin. We recommend reviewing this guide to ensure you are not missing anything: hreflang: The ultimate guide.

Since you are using WPML plugin, please get in touch with them to help fix the hreflang language issues. You can also ensure that the lang is appropriate with these codes: hidden link

There should be a way to update the language in WPML plugin.

Symptoms:
The hreflang tags have incorrect language and region codes, affecting SEO.

Questions:
How can I fix the hreflang language issues using the WPML plugin?
Is there a way to update the language codes in the WPML plugin?

November 14, 2024 at 10:43 am #16401745

erkkiM

And i can see that error in site-wide

Screenshot 2024-11-14 at 12.42.54.png
November 14, 2024 at 3:00 pm #16403551

Nicolas V.
Supporter

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

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

Hello,

Welcome to the WPML support forum.

I would need a little more information about the issue.

- I visited your website and review the source code:

<link rel="alternate" hreflang="en" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="et" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="lv" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="lt" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="da" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="nb-nb" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="pl" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="fi" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="sv" href="<em><u>hidden link</u></em>" />
<link rel="alternate" hreflang="x-default" href="<em><u>hidden link</u></em>" />

- All languages are using the correct hreflang except for "nb-nb".
- This language is not a default WPML language, and I even see that the proper Norwegian language "no" is present in your debug info.

Did you create a second/custom Norwegian language?
I would recommend to use our default language which is correctly set up because you won't be able to use "no" for your custom language as it's already registered.

November 15, 2024 at 4:55 am #16405656

erkkiM

Yea, about nb i know. And thats not problem right now.

I made a video so you can see what i mean.
hidden link

/* Frog program*/
Description
URLs with hreflang annotations that contain invalid language (in ISO 639-1 format) and or optional regional (in ISO 3166-1 Alpha 2 format) values. Unsupported hreflang values can be viewed in the lower window 'URL Details' pane with an 'invalid' status.

How To Fix
Update hreflang annotations to include valid language and regional values, so they can be used for geotargeting the right audiences appropriately.

November 15, 2024 at 12:27 pm #16408297

Nicolas V.
Supporter

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

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

Hello,

Thanks for the video, it confirms that the issue encountered is the one I reported.

Let me explain:
- Your Norwegian language is using an incorrect language code "nb-nb"
- On all pages in all languages, you will have in the source code links to all translations (hreflang links).
- That's why the issue is reported even on Polish or English pages.
- That's because the Polish and English pages will contain a link to the problematic Norwegian language.

I took a screenshot of your video, when scanning the English homepage, in the bottom left part you can see that the "nb" language is invalid, while all other languages are valid.

Switching to our default Norwegian language "no" should fix this issue.

screenshot-2024_11_15-07_12_08.png