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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Bobby 3 months ago.

Author Posts
January 23, 2024 at 10:08 pm #15219045

jamesW-8

Tell us what you are trying to do?
I need to change the url for the Hebrew language, instead of HE I need it to be IL, is it possible to change?

I tried to create a custom language by ahreflang it was marking me duplicate and I need to keep the Hebrew language, I just want to change the code/url. so that the urls are mysite.com/il/hebrew-article. instead of mysite.com/he/hebrew-article.

I look forward to your recommendations on how I can achieve this.

Is there any documentation that you are following?
I checked help files on creating custom languages but it's giving me a couple of duplicate language errors.

What is the link to your site?
hidden link

January 24, 2024 at 4:39 am #15219441

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi,

The language code cannot be changed once a language has been added to WPML.

If you wish to use a difference language code you a custom language is required.

As you already have content under the original Hebrew language this will take some extra steps to be done correctly.

- Go to WPML->Languages->edit languages
- Change the default locale and hreflang for the original Hebrew language and update
- Add a custom language -> set your code to he and set your default locale and hreflang to the desired one now
- Go to WPML->Translation Management-> select all your existing Hebrew pages from the original one and bulk duplicate them into the new Hebrew we just added

Let us know your results, please.

NOTE: Always have a recent and working backup before making any changes recommended by our team or a 3rd party

January 24, 2024 at 7:25 pm #15223490

jamesW-8

Thank you so much! It is working perfectly including automated translation. Greetings

jamesW-8 confirmed that the issue was resolved on 2024-01-24 19:25:49.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.