Hindu texts are written in Sanskrit, were Hindu texts written before Pali texts?
The oldest surviving Buddhist texts in the Pali language come from the relic chamber of a Buddhist stupa at Sri Ksetra. They consist of a twenty-leaf manuscript of solid gold and a large gilded reliquary of silver. A new and exhaustive palaeographic study of these inscriptions shows that they date from the mid-fifth to mid-sixth century AD.
This link provides multiple reference to support this claim : http://dhammawheel.com/viewtopic.php?t=6033
The Rig Veda, a Sanskrit text was written around 1500 BC. Although, it is said that there was an oral tradition spreading it for a very long time. Hence, Sanskrit is older, as Sanskrit texts were written way back. This link provides the dates when the Sanskrit texts were written including Rig Veda:
Vedic Sanskrit is much older than Pali texts. The Rig Veda was composed around 1500 - 1100 BCE, while the Buddhist text Tripitaka was composed between 500 - 1 BCE. Vedic sages are also referenced in the Tripitaka (see Majjhima Nikaya 95). Interestingly, MN95 mentions three Vedas and not four. This proves that the Vedas are older than the Tripitaka. See Timeline of Hindu texts.
However, Classical Sanskrit was standardized by the grammarian Panini around the same period as the life of Gautama Buddha. The Bhagavad Gita was composed in Classical Sanskrit (to my understanding) and is dated 400 BCE - 300 CE. The Bhagavad Gita is therefore not older than the oldest composition of the Tripitaka.
Interestingly, Gautama Buddha did not speak Pali. He most likely spoke Magadhi Prakrit, which was the main language of the Kingdom of Magadha, where the Buddha spent most of his life in. The Buddha taught the people around him in their own language. Magadhi Prakrit basically means the Prakrit dialect spoken in Magadha. The Edicts of Asoka were also written in Magadhi Prakrit in the Brahmi and Kharosthi scripts.
Jain texts were written in Ardhamagadhi Prakrit, which is also a related language. Jainism founder Mahavira lived around the same time as the Buddha, although the two never met. Mahavira is referenced in the Tripitaka as Nigantha Nataputta and Jains are referenced as Niganthas (see Majjhima Nikaya 101).
According to Bhikkhu Bodhi (a leading Tripitaka scholar and translator) below, the Pali language is a hybrid construction comprising several third century BCE Prakrit dialects and subjected to a partial process of Sanskritization. Therefore, Pali is definitely younger than Sanskrit and the Prakrits. Modern Magahi or Magadhi, Magadhi Prakrit, Ardhamagadhi Prakrit and Pali are all closely related languages.
Scholars regard this language (Pali) as a hybrid showing features of several Prakrit dialects used around the third century BCE, subjected to a partial process of Sanskritization. While the language is not identical to what Buddha himself would have spoken, it belongs to the same broad language family as those he might have used and originates from the same conceptual matrix. This language thus reflects the thought-world that the Buddha inherited from the wider Indian culture into which he was born, so that its words capture the subtle nuances of that thought-world.
it is false that Sanskrit is known from 3000 b.c. it may have existed back then, but we have no proof. if Indus valley script is proven to be Sanskrit it does push Sanskrit way back into the past. the earliest known Indo-Aryan is from the mitanni kingdom - around 1400 b.c. that makes attested Hittite, Sumerian and Akkadian older.
unfortunately, linguists say that attested vedic sanskrit is "younger" than mitanni indo aryan the same way hindi is younger than sanskrit. a given hindi text maybe older than a given sanskrit text - but hindi as a whole is younger. there ia word "priyamazda" in mitanni which is "priyamedha" in sanskrit and linguists say the Sanskrit form descended from the mitanni form. there a few other examples that makes rig veda younger than Mitanni.
the mitanni data is very damning for out-of-india theories - but perhaps arguments may still be found to prove sanskrit originated from India.