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 thread is resolved. Here is a description of the problem and solution.
Problem: The language code for Portuguese is pt-pt, and the client wanted to change it to just "pt".
Solution: To change the language code slug:
* Create a new custom language and set the code there.
=> Go to WPML=> Languages , "Site Languages" , and click on Edit Languages, from there add language.
eg. create your custom language as Portuguese but set the slug as pt instead of pt-pt
* OR (not advisable unless it's the only option) make the change in the *_icl_languages table (usually wp_icl_languages)
You can do that by changing the slug directly from the database.
***This may be dangerous! Please make sure to back up the database first. ***
You need to make the change in the *_icl_languages table (usually wp_icl_languages)
Once you have change language code please click on WPML > Support > Troubleshooting. Look for 'Clean up' and click on 'set language information' button.