Tell us what you are trying to do?
Hi there,
I need to replace the language code /en/ by /gb/.
I want my english urls to be like mywebsite.fr/gb/something instead of mywebsite.fr/en/something
I can't edit the "code" in language. When I removed the english language (my main/default language is french) and tried to add it with the "gb" code, I got a notification telling me the same language already exist.
Is it because I selected "english" in the mapping? How can I archive that though?
First in order to switch your website back to English you need to:
1. Go to WPML->Language->Edit languages
2. For the "English" language change the "Default locale" and "hreflang" to "en_US" and save
The language code cannot be changed after a language has been added.
However, you can create a new "custom" language with the desired language code.
1. Go to WPML->Language->Edit languages
2. Add a new custom language with the custom language code ("gb" in your case)
3. Once it has been added you can now use the Translation Management dashboard to bulk duplicate from the "old" English to the "gb" English you just added
4. Remove the old language and start using the new custom one ("gb" English)
NOTE: To use the same default locale you will need to first change the English default locale before adding the new language and saving.
Then add the original default locale to the new custom language.