Through most of ancient and medieval times, India remained fragmented into various small (and often warring) princely states. Various kings and emperors tried to unite a large part of the country under their reigns, but these empires eventually disintegrated.
'Various small kingdoms with various languages! Even under those kings and emperors who 'tried to unite a large part of the country'! Country? What country? The land!
The British created India, ONE country with ONE common language, Mits! Let us give them credit for that! If Africa adopted this, there would be many geopolitical changes in the world!
The railways weren't built for Indians but for troop movements! But this helped in unifying the country!