Who ruled India before Mughals?

The Ghaznavid Empire gradually moved into India and later conquered the Delhi Sultanate, a Delhi-based Muslim empire that spanned large parts of India from 1206–1526, whose collapse eventually led to Mughal rule in the country.                       

Language_(English)