Spanish is a Romance language with approximately 417 million speakers, 322 to 358 of whom speak it as a first language while the remainder speak it as a second language. A significant number of people also speak Spanish as a foreign language. Spanish is spoken in Spain and 22 other countries including: Andorra, Argentina, Belize, Bolivia, Cayman Islands, Chile, Colombia, Costa Rica, Cuba, Dominican Republic, Ecuador, El Salvador, Equatorial Guinea, Guatemala, Honduras, Mexico, Nicaragua, Panama, Paraguay, Peru, Uruguay, the USA and Venezuela
Spanish first started to appear in writing in the form of notes and glosses in Latin religious texts, the Glosas Emilianenses, dating from the 11th century. During the 12th century, law codes (Fueros) were being translated into Spanish. Spanish prose flowered during the reign of King Alfonso X the Wise of Castile (1252-84), who in addition to being the king and a poet, also found time to write an encyclopaedia in Spanish called Las Partidas, which contains laws, chronicles, recipes, and rules for hunting, chess and card games. The first Spanish grammar, by Antonio de Nebrija, and the first dictionaries were published during the 15th and 16th centuries.
In Spain this language is generally called español (Spanish) when contrasting it with languages of other countries, such as French and English, but it is called castellano (Castilian, the language of the Castile region) when contrasting it with other languages spoken in Spain, such as Galician, Basque, and Catalan.
Some philologists use Castilian only when speaking of the language spoken in Castile during the Middle Ages, stating that it is preferable to use Spanish for its modern form. The subdialect of Spanish spoken in northern parts of modern day Castile is also called Castilian sometimes, and differs from those of other regions of Spain, however the Castilian dialect is conventionally considered in Spain to be the same as standard Spanish.
The name castellano is widely used for the language in Latin America. Some Spanish speakers consider castellano a generic term with no political or ideological links, much as "Spanish" in English.