Chinese is the written language, based on Mandarin. Mandarin and Cantonese are separate, though closely related, spoken languages. They're a lot closer to each other than English and Spanish (more like French and Spanish), which is why the same written language works for both sets of speakers: most of the vocabulary is shared.