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.
Let me know your results, please.
Regards,
Marsel
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.