Because cities like Palenbang were entrepots, where merchants from different parts of the world came together to trade, many languages would have been spoken. However, when people from different regions needed to communicate, they spoke Malay, which was the lingua franca of the region. Lingua franca is a language used by people who speak different languages who still need to interact. In fact, even today Malay is still the lingua franca of the region.
Because Mahayana Buddhism was so important, monks and holy men were familiar with Sanskrit, which was the language in which the Mahayana scriptures were written. Sanskrit was so prominent in the kingdom that religious scholars from other parts of the world actually went to Palembang for long periods of time to study the language.