smokey wrote:Some sources say Sanskrit and some Magadhi. Now I wonder is there any evidence? I apologize if the question has been asked previously on this forum.
He did not speak Sanskrit. At the Buddhas time different dialects were spoken in Northern India. They were probably not very different from each other, and not very different from Sanskrit. Pali is a standardization from these dialects (we find traces of different dialects in Pali), a couple of hundred years after Buddha, and the Pali texts therefore probably are as close to the Buddha's own language as we can reasonably expect to get.
The term Magadhi is ambiguous. It means "from Magadha", and so we have to ask what area was called Magadha, and at what time.
At the Buddha's time Magadha was one of several states in Northern India. We do not know if, or how much, the dialect in Magadha at that time differed from the neighboring dialects. As far as I know, we have no documentation for the use of Magadhi as a linguistic term at that time.
Magadha was a rather aggressive kingdom, and after the Buddha's time it conquered other states and expanded until it covered most of India at the time of Asoka. Asoka was king of Magadha, that is, he was king of "greater Magadha" - most of India. At his time Buddhism was exported to Sri Lanka, and so were the Pali texts. But Sri Lankan commentators did not call the language "Pali". They called it Magadhi, which is quite logical, since the texts had been brought to them from Magadha, from "greater Magadha", that is - from the Indian mainland. Therefore the term Magadhi for the Pali language as used in the commentaries, probably mean nothing more than "Indian".
Later, the Asokan dynasty fell from power, and the name Magadha was again restricted to the area, the province that had been the original state of Magadha at the Buddha's time. During the centuries the dialects in different parts of India had diverged (as is normal for languages), and the dialect of Magadha had acquired its own distinctive features. Now came the time of the great Sanskrit dramas, and the Sanskrit authors consciously used different dialects and cultivated these as written sociolects, which were called Prakrit. Thus there arose a Prakrit language/dialect called Magadhi.
There seems to have been quite a lot of confusion due to these different usages of the term "Magadhi".
To sum up:
"Magadhi 1" - whatever dialect was spoken in Magadha at the Buddha's time. We do not know to what degree, if at all, this was any different from the language spoken over most of Northern India.
"Magadhi 2" - the language of the texts from "greater Magadha" that arrived in Sri Lanka at the time of Asoka. This "Magadhi 2" is the same as we today call Pali.
"Magadhi 3" - the later dialect of the province of Magadha that became a Prakrit language in the Middle Ages. No special connection to Buddhism or the Pali texts.