I am setting up WPML for the first time. My intent is to translate an english USA website so that users in Brazil can have their translation.
I chose Portuguese (Brazil) but I don't like the /pt-br URL so I am trying to add a new language with just BR as code so that the url can be /br without the PT in it as it's pointed exclusevily to users in Brazil.
As you can see in my screenshot I get the error that default locale already exists. Should I use just BR on the default Locale? But I think pt_BR is correct for locale and href... I just wanted to edit how URL displays, not mess up with google or browser interpretation.
How should I proceed? Would appreciate fast response as I am setting all up for the first time.
Thank you for contacting us. This is happening because you are trying to use a default locale that already exists. Please, follow the steps below so you can get the result you want:
- Click on the WPML > Languages > Site Languages
- Click on the "Edit Languages" link (the same page you are showing on your screenshot)
- On the "Portuguese, Brazil" change the "Default Locate" to pt_BRA
- Change the hreflang to "pt-bra"
- Click on the Save button
- Now enter the language you want, just as you are doing now
- Click on the WPML > Languages > Site Languages
- Click on the "Add / Remove languages" button
- Disable the "Portuguese (Brazil)" language"
- Click on the Save button
By following these steps you will get a language with the code "br" just the way you want it.
Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.
Thank you.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.