Skip to content Skip to sidebar

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

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 11 months ago.

Assisted by: Bruno Kos.

Author Posts
August 3, 2023 at 10:37 pm #14152215

Nate

I am trying to: Change the hreflang to ja for a language with code jp and url /jp

Link to a page where the issue can be seen: sitewide

I expected to see: I expected to be able to keep "jp" as the code and /jp url, but be able to change the hreflang to "ja".

Instead, I got: I changed the hreflang to "ja" and clicked Save but it reverted back to "jp"

Screen Shot 2023-08-03 at 12.32.37 PM.png
August 4, 2023 at 1:23 pm #14155173

Bruno Kos
WPML Supporter since 12/2018

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

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

Hi,

I tried saving this on my localhost and it seems to be working, so there doesn't seem to be an outstanding bug with the Japanese language. That being said, can you please check if this issue appears when:

- only WPML plugins are activated, as it will tell us if there is an interaction issue with other plugin
- theme is set to a WordPress default like Twenty Twenty as it will tell us if there is an interaction issue with your theme

If you find that the issue is no longer there, then I suggest you activate the theme first and check if the issue is still happening. If still all working well, then there is possibly some compatibility problem with any of your plugins, so you can for example activate 3 plugins at a time and observe the problem then.

Regards,
Bruno Kos

August 10, 2023 at 10:43 pm #14185287

Nate

Thank you for your help thus far. When I try to change the Default Locale and hreflang to "ja", I receive the following error, "The default locale already exists." See screenshot. This may help... When we created the language, we wanted to Japanese urls to appear as /jp instead of /ja. So, we created a custom language with code "jp" and default locale "jp_JP" and hreflang "jp". It seems that since there is a "ja" language already built into WPML, that's why it's not letting me change the custom language to hreflang "ja" as well. What is the workaround? What do we need to do so that our custom language has hreflang "jp"?

Screen Shot 2023-08-10 at 12.39.04 PM.png
August 14, 2023 at 7:32 am #14194967

Bruno Kos
WPML Supporter since 12/2018

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

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

Yes, this value can't be used on multiple languages, only one.

For this case, you could activate built-in Japanese, change default locale to something like jp_notused, save and then add your own.

The topic ‘[Closed] Can't change hreflang’ is closed to new replies.