Names given to the Spanish language
Formally speaking, the national language of Spain, the official Spanish language, is the Castilian language (as opposed to regional Spanish languages like Galician, Catalan, Asturleonese and Basque). As such both names, "español" and "castellano", have distinct and independent meanings that may be required for clarity in some specific contexts.
Generally speaking, though, both terms can be used to refer to the (national) Spanish language as a whole, with a preference for one over the other that depends on the context or the speaker's origin. "Castellano" (as well as "Castilian" in English) has another, more restricted, meaning, relating either to the old Romance language spoken in the Kingdom of Castile in the Middle Ages, predecessor of the modern Spanish language, or to the variety of Spanish nowadays spoken in the historical region of Castile, in central Spain.
History of the Spanish language
Language politics in Francoist Spain declared Spanish as the only official language in Spain, and to this day it is the most widely used language in government, business, public education, the workplace, cultural arts, and the media. But in the 1960s and 1970s, the Spanish parliament agreed to allow provinces to use, speak, and print official documents in three other languages: Catalan for Catalonia, Balearic Islands and Valencia; Basque for the
Basque provinces and Navarre, and Galician for Galicia. Since 1975, following the death of Franco, Spain has become a multi-party democracy and decentralized country, constituted in autonomous communities. Under this system, some languages of Spain—such as Aranese (an Occitan language of northwestern Catalonia), Basque, Catalan/Valencian, and Galician—have gained co-official status in their respective geographical areas. Others—such as Aragonese, Asturian and Leonese—have been recognized by regional governments.