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.

This topic contains 2 replies, has 2 voices.

Last updated by alejandroA-19 4 years, 5 months ago.

Assisted by: Bruno.

Author Posts
November 11, 2019 at 1:32 pm #4925239

alejandroA-19

Hi,

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.

Thanks!

Screen Shot 2019-11-11 at 10.19.04.png
November 12, 2019 at 12:38 am #4928719

Bruno

Hi,

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.

language.png
language-2.png
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.