If Moodle is installed in English and we need to change the language to Spanish, first we need to download the translation.
To do this, we must first access our Moodle panel and go to Site administration >> Language >> Language Pack.
And we will click on the link that appears at the top.
This link will take us to the official Moodle website, where we can find all the languages, in our case we will search for and download the Spanish language.
Once the language is downloaded, we will have to upload it to the path indicated, in our case, it will be: /var/www/vhosts/curso-moodle.com/moodledata/lang/
Once uploaded, we will have to unzip it in the path indicated by our Moodle.
Once it is unzipped, we will reload our Moodle page and the Spanish language will appear.
After this, we can select the Spanish language in our Moodle and we can select it.
Don't forget that to enable it by default for our users, it will be necessary to access Language Settings and select Spanish.