World Language Requirements

I realized that most colleges (Harvard, MIT etc.) require a few years of a world language. I’m not able to fit an extra world language in my schedule, so I’m wondering if taking 4 years of spanish at a local community college would fullfill the requirement.