Mathematics is more important because its universal. In the future, we can create new languages if it was ever needed. New mathematics cannot be created, only discovered.
So if it was a choice of understanding every language in the world or understanding all existing mathematics, than a person should choose knowing all existing math as it would greatly benefit the world.
Knowing all mathematics could advance our society limitlessly. Knowing all languages would not benefit anyone outside yourself, and as I said before, we can create new languages at will if it was ever needed.