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 topic contains 12 replies, has 2 voices.

Last updated by fabioF-11 3 weeks, 1 day ago.

Assigned support staff: Raja Mohammed.

Author Posts
September 14, 2019 at 11:35 am #4572613

fabioF-11

Tell us what you are trying to do?

I have my site in Brazilian Portuguese (pt-br) and I want to make it multi-language. I would like to have languages on "sub-directories", and the actual language of the site is Brazilian Portuguese. As the href for it is pt_br, the "sub-directory" for brazilian portuguese gets "mysite.com/pt-br/" but the correct should be "mysite.com/br/".

Is there any documentation that you are following?

I've learnt to create /br/ href language on the article below, but I would need to have this BEFORE running WPML Install Wizard. Doing after, I get many translations "lost" wich I don't know how to erase after changing my (main) language to "/br/":

https://wpml.org/forums/topic/edit-sub-directories-slugs-for-languages/page/2/#post-2916395

How can I delete those "old lost translations" WPML leaves when I change my main language from "/pt-br/" to "/br/"? Is there any way to get rid of those? I can't find them and there's always that message about those translations that got lost due to the language not being used (referring to the original "/pt-br/" language used).

Is there a similar example that we can see?

I don't have an example. But WPML should default the "sub-directory" from where the site will be seen, from "mysite.com/pt-br/" (not good) to "mysite.com/br/" (good). Is there any way to have this working, and not having "lost translations" appearing on "WPML > Languages"?

What is the link to your site?

hidden link --> Staging site I've created to learn to make it work.

September 16, 2019 at 11:28 am #4579805

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello there,

I am trying to understand the issue here,

It seems you have changed the language href code for Brazilian Portuguese form pt_Br to br. Which resulted in some of the contents stays in pt_br instead of br. is that correct?

Secure a backup of your site and database
- Goto WPML > Support > Troubleshooting
- Click on the the below buttons
[x] Clear cache with WPML
[x] Set Language Information
[x] Remove orphaned content

Let me know if that helps.

Kind regards
Raja

September 17, 2019 at 7:02 am #4585903

fabioF-11

Hey Raja, thank you for your reply.

Happens that I know how to create a new (custom) language with code /br/, but then everything is already set to pt-br wich turns nearly impossible to remove orphaned content.

Everything keeps attached to pt-br and the only way is to duplicate everything and then erase the originals? How about categories and tags, that can't be duplicated?

Thank you very much for your time and patience, cheers!

September 17, 2019 at 10:37 am #4587745

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the information, Yes, your assumption is right.

Creating a new language require you to duplicate the contents to the new language and delete the old content in pt_br language. For categories and tags, you might need to manually change the language of the categories in each category edit section

However, If you can provide a duplicator copy or migrate your site to our private server I can test this case with some tools in development and let you know if that helps. I cannot guarantee that would help the tool is still under developer that might help in some cases.

Let me know whichever is feasible for you.

September 19, 2019 at 1:39 pm #4605445

fabioF-11

Hello Raja, sorry for my late reply I'm a bit busy this week.

I've cloned the site and created an Admin User so you can get in and test it. I'll install the relevant WPML Plugins on that install, please let me know if I should proceed the WPML Wizard and install it.

It will then have all that "untranslated" content that I would like to get moved from the "dummy" "pt-br" language, into the new "br" language. As I've already seen other tickets around this subject, I really insist that WPML should use "br" as default code for Brazilian Portuguese [instead of Portuguese (Brazil) - "pt-br"] and "pt" for European Portuguese [instead of Portuguese (Portugal) - "pt-pt']. Will avoid WPML Support a lot of Tickets.

Please let me know if I should proceed with WPML Wizard, or if you want to put your "under-dev possible solution" to work instead. Also, let me know a way to send the connection credentials in private, they'll include SSH/SFTP and WP Login Credentials (the same).

I'll keep looking forward from you, thanks!

September 20, 2019 at 6:02 am #4609931

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for getting back, The language codes used in WPML are based on ISO standards hidden link.

Please pass the credentials for the cloned site including the FTP details, I will do a few tests and let you know the possible solutions, I have enabled private fields for you to securel share the details.

Kind regards
Raja

September 20, 2019 at 12:28 pm #4612169

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello there,

The supplied site credentials are not working, Please verify the same and update your previous reply with working credentials.

Let me know once done.

September 20, 2019 at 12:32 pm #4612177

fabioF-11

Hey Raja, just updated the private message credentials. I've tested now and both WordPress (using any browser) and SFTP via Terminal and FileZilla (regular FTP doesn't work) are working perfectly. Thanks, cheers!

September 20, 2019 at 12:42 pm #4612201

fabioF-11

Hey Raja,

About the language codes, if all languages were using the language codes from the link you provided - hidden link - then we should have:

US English --> /en-us/
European Spanish --> /es-es/

And so on. I just assume WPML should use what best suits your customers, wich is:

Brazilian Portuguese --> /br/
European Portuguese --> /pt/

You can ask to ANY brazilian or portuguese developer, answer will be always the same.

Anyway I'll keep looking forward from you about this, and I would like to suggest WPML to contact Paid Memberships Pro DevTeam. You could develop together an integration to allow WPML sites to use Paid Memberships Pro's checkout proccess (instead of WooCommerce that is the workaround we have to use for now, and that I don't know if or how it works

First of all I would need all my content to be at hidden link then I can start translating it to the other 5 languages. I need to learn the proccess using this Staging Site - hidden link - so later I can replicate on the Live site. I also want to learn how to develope a site from the scratch using WPML since WP install.

Please let me know if is there any solid source on learning to do that, thanks!

September 20, 2019 at 4:16 pm #4613509

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I am still unable to access the site, Are you sure the details are updated in the previous post. Could you please reset it again and paste the new credentials in your next reply which I have marked as private so that it is visible only to you and me.

September 20, 2019 at 4:42 pm #4613615

fabioF-11

Screenshots from Terminal connecting wit these last credentials on SSH and SFTP.

I would recommend you to clear your browser's cache, and all cookies for this domain.

September 23, 2019 at 11:07 am #4622859

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I am able to login to the test site. However, I am unable to access the database using WP PHpmyadmin plugin, I encounter a 403 permission issue.

Please make sure the WordPress file permission are as per the recommendation. Refer to any of the documentation in the internet to fix the file permission, Something similar might help hidden link

Check if you can access the database from your Dashboard > WP-PHPMyadmin

Kind regards
Raja

September 23, 2019 at 12:38 pm #4623955

fabioF-11

I've managed to learn a way to solve this problem "from the root" (while installing WPML). I see that you have many Support Tickets regarding this same issue (changing slug of the translations for languages with multiple locale)...

I would be glad to write an article for WPML called "Customizing URL Slug for Multiple Locale Languages with WPML", on wich I would guide users trhough this not very complex but a bit tricky proccess.

Please contact me using my Membership Profile e-mail address in case you have interest. If arranged, I can write the article in English and have it also available in Brazilian Portuguese (since it's my native language). Contact me in case you have interest so we can arrange the rates for the job, etcetera.

I'm very impressed with the evolution of WPML on this year, cheers!