This thread is resolved. Here is a description of the problem and solution.
Problem: The client wants to change the language code for Chinese simplified and Portuguese Portugal without affecting the existing content Solution: We recommend creating a new custom language with the desired language code instead of changing the existing one, as altering the language code directly in the database could break your site. For Chinese, you can create a language with the code 'ZH'. Please refer to our documentation on editing WPML's languages table and watch this helpful video: video guide. For the existing translated content in 'zh-hans' or 'pt-pt', you can duplicate them in bulk to the new languages using the WPML Translation Management Dashboard. For more details, check out how to duplicate pages and posts in bulk.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/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.
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.
Background of the issue:
I'm using this format 'Different languages in directories (hidden link - English, hidden link - Arabic)' for my site hidden link. I have an issue with 2 languages whose format are as follows: hidden link - From Chinese simplified, hidden link - From Portuguese Portugal. I need to use this format instead: hidden link, hidden link. I already have content existing on the site and translated into those languages.
Symptoms:
I need to change the URL format for Chinese simplified and Portuguese Portugal without affecting the existing content.
Questions:
Can I edit the code to change the URL format for Chinese simplified and Portuguese Portugal without affecting the existing content?
Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly.
I tried the solution on the thread, I have quite a number of translated pages, and I have also tried adding custom languages, but I keep getting the error " Please, enter required data." despite filling in all the needed information.
Thank you for the updates. Please share a screenshot for a better understanding of the following.
I keep getting the error " Please, enter required data." despite filling in all the needed information.
The language code is a unique value and it will not be possible to change the language code from the *zh-hans* to *zh*. Because it is stored in the database and connected with multiple tables. And also there are high chances of breaking the site if we change it directly from the database.
Therefore as a workaround, you can create a new custom language Chinese with language code ZH. Please refer to the following documentation for more details.
For the existing translated pages/posts(*zh-hans* or *pt-pt*), you can bulk duplicate them to the new languages from the WPML Translation Management Dashboard. Please check this article for more details
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.