Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to change the language code from pt-br to pt in the permalink while ensuring all the translated data remains intact.

Solution:
1. Create a custom language with the desired language code (pt).
2. Duplicate all the content from the current "pt-br" to the new custom language. The content will not be automatically added to the new custom language; it must be duplicated manually.
3. We provided custom search URLs to find existing tickets with recommended solutions:

For further details on displaying untranslated content, you can refer to our documentation: Displaying Untranslated Content on Pages in Secondary Languages.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If you encounter issues or if the solution does not work for you, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket with us.

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 3 replies, has 2 voices.

Last updated by Mihai Apetrei 1 year, 8 months ago.

Assisted by: Mihai Apetrei.

Author Posts
February 19, 2024 at 5:28 am #15315884

camillaB-7

Tell us what you are trying to do? : I want to change the language code pt-br to only pt in the permalink. I have already translated my site to PT-BR, so all the data is translated. Can you suggest a solution so that the data remains, only the permalink changes from PT-BR to PT.

Is there any documentation that you are following? : I have checked this topic (https://wpml.org/forums/topic/trying-to-change-pt-br-url-for-brazil-to-pt-but-is-not-works/), but if I have added custom language will the data get merged in that custom language?

What is the link to your site? : hidden link

February 19, 2024 at 1:09 pm #15318359

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

I created this custom search URL for you so that you can find the existing tickets for this exact same topic that already contain the solutions recommended by my colleagues:

hidden link

It seems that one of the URLs was already found by you - so to answer your question: After you create the custom language, you will need to duplicate all the content from the current "pt-br" to the new custom language that you created.

The content won't be added to the new custom language automatically, it has to be duplicated.

Related documentation:
https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/

I hope that you will find this information helpful.

Mihai Apetrei

February 20, 2024 at 5:29 am #15320544

camillaB-7

How we can duplicate content from the current "pt-br" to the new custom language? as we have default language is English.

February 20, 2024 at 9:36 pm #15324885

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+02:00)

Hi there.

I created this custom search URL for you so that you can find the existing tickets for this exact same topic that already contain the solutions recommended by my colleagues:

hidden link

I hope that you will find this information helpful. This might save us some extra time which is why I created this custom search.

Mihai