Hi, I'm reaching out cause my company is about to release the Portuguese version of one of our commercial WordPress + WPML websites.
The problem, is that when we add the language "Portuguese (Portugal)" in the Languages WPML dashboard, it has the effect to make all content of that language available via : hidden link, the "pt-pt" is a problem for us.
The other languages have 2 letters slug, such as /de for German; /fr for French, which is OK, but we know we will not have the 2 Portuguese language (Portugal and Brazil), only one will be available, so we want /pt, the 2 letters slug, and make everything works like a charm.
The page of the manipulations:
/wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Flanguages.php&trop=1
Please help by telling us how to perform the manipulation making it work as we want.
Languages: English (English )Vietnamese (Vietnamese )
Timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Hi Alexandre,
I'm Long from the WPML Development team, I'm happy to help you with this issue.
The default language code in WPML settings for Portuguese (Portugal) is `pt-pt` and for Portuguese (Brazil) is `pt-br`. If you want to have the `pt` language code, you need to create a custom language. I suggest you follow steps below and let me know if it helps:
1. Revert the changes in the table wp_icl_languages.
2. Go to admin area > WPML > Languages > Click on Edit languages > Create a new language with language code `pt`. Please notice that the language code won't be changed.
3. Translate your content into the new language `pt`.
4. Consider removing all content of the language `pt-pt`.