Background of the issue:
I am trying to add a custom language to my WordPress site using WPML. The goal is to create an English language version of the website specifically for users in India. I am following the standard process for adding a custom language.
Symptoms:
When I attempt to add the new language, I receive an error message stating that the 'hreflang' already exists, even though the standard 'India' language is not being used.
Questions:
How can I add a custom language for an English version of the website in India without encountering hreflang conflicts?
What should I do if the 'in' hreflang is already in use, but I need it for my custom language?
Thank you for contacting WPML Support. It doesn’t matter if the language is currently enabled or not, hreflang value should be unique in all languages which are stored in the database. Could you please to follow the below steps and see if this resolves the issue:
1. Go to the WPML >> Languages > Add languages > add the India language
2. Edit the languages
3. Change the default hreflang to something else and save it
4. Now add your custom language and assign it to “in”.