Like in most of Latin America, Spanish is the official language of Costa Rica. Note : In Brazil, they speak Portuguese.
Costa Rica