Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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 1 reply, has 2 voices.

Last updated by Jamal 11 months, 2 weeks ago.

Assigned support staff: Jamal.

Author Posts
March 10, 2019 at 10:59 pm #3306603


I am trying to set the Language URL format to use a directory for default language.
In site languages Portuguese hreflang is set to "pt" but in the URL the language is pt-pt.

what I'm getting:
hidden link

what I wanted to get:
hidden link


March 11, 2019 at 3:00 pm #3313991


Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Marco,

Thank you for contacting WPML Support. I will be glad to help with this.

According to your debug informations, you have two active languages "en" and "pt-pt". So i assume you want to change the url from /pt-pt/ to /pt/ even though both links now redirects to root url /.

At this point you cannot change the language code from "pt-pt" to "pt". Once a language code is set it cannot be edited.
As a workaround, you can create another language with code "pt" then translate all your content. And finally hide the "pt-pt" language.

I hope this answers your question. Otherwise please provide more details so i can understand better.

Best regards,
WPML Support