Hi! I noticed that the language "Portuguese (Portugal)" becomes "pt-pt" in the url. After reading this thread (https://wpml.org/forums/topic/how-to-change-language-url-format-code/) I removed "Portuguese (Portugal)" and added a custom language instead, and selected "pt" as the language code.
Now I get the following error:
"WordPress cannot automatically download translations for the following languages:
Portuguese (current locale: pt) - suggested locale(s): pt_PT, pt_BR, pt_AO, pt_PT_ao90
To fix, open "Edit Languages" and set the "default locale" values as shown above."
I tried adding "pt_PT" as the default locale, but then get the error:
"The default locale already exists."
In order to solve the error "The default locale already exists." , please go to WPML->Languages->Edit languages -> find the original PT language and change it's default locale to something else then update.
Once you do this then you can now assign the default locale pt_PT to the new custom language you created and save.
Let me know your results, please.
NOTE: If you have removed the "old" language, you can temporarily enable it, change the locale, and then once done remove it again.