I took several classes in college that talked about the different languages of Spain. There are four main languages on the Iberian peninsula: Portuguese, Catalan, Castilian and Basque. The first three are Latin based languages and the fourth is not known to be related to any other languaage spoken anywhere in the world today. Current theory holds that it is a descendant of one of the pre-Latin languages spoken on the Iberian peninsula. Galician (gallego) a language closely related to Portuguese is spoken in the northwest corner of Spain. I've also read that Portuguese comes from gallego. People from Galicia went to what is now Portugal and settled there of course eons ago. Catalan is also spoken in Italy on the island of Sardegna. (Sardeña is how it is pronounced.) My sister's father-in-law is from Valencia and he speaks Catalan. Says he could understand Italian from the beginning from knowing Catalan and Spanish. Leones and Aragones is spoken by a small number of people. The Spanish of southern Spain ironically is the Spanish closest to Latin American Spanish. I have read that and also had a Spanish neighbor from there and that is how she spoke. She did not have that lisp Spanish sound that we all know about.
kaixokaixo, do some research on the "Spanish Civil War" 1936-1939. Part of the war was fought to make
Catalan a separate country and language. Obviously they lost and Catalan had to stay with Spain. The
rest of the minority languages suffered under the dictator Franco also.