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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 7 months, 1 week ago.

Assigned support staff: Jamal.

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

marcoR-11

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

Best
Marco

March 11, 2019 at 3:00 pm #3313991

Jamal
Supporter

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,
Jamal
WPML Support