phpdotenv with multi-lang Craft setup on MAMP
Some troubleshooting steps:


Make sure a vendor/ folder exists two levels up from es/. If not, you need to run composer install in your terminal from the directory that contains a composer.json file. (If you don’t have Composer installed, see its installation instructions.)
Make sure a .env file exists two levels up from es/. It probably won’t, as you’re not supposed to include your .env file in the Git repo. You can copy it from production, or from .env.example if that exists. Then fill it in with working credentials for your local environment.


Matt Stauffer wrote a great article explaining how to get phpdotenv running with Craft 2: https://mattstauffer.com/blog/environment-specific-configuration-for-craftcms-using-phpdotenv/ Probably a good idea to read through that just to get an idea of how it’s all supposed to work (and what the advantages are).