Do the French text in English or French? Do the Japanese text in English or Japanese?
Of course most people in China text in their native language (mother tongue), which is Chinese. Mandarin is just a dialect of speaking Chinese (and standard speaking Chinese), not equivalent to Chinese as a language.
But I guess the reason why you asked this question was that you couldn’t imagine how people type thousands of Chinese characters with only 26 Latin alphabets. Maybe like this figure below?
Don’t worry. It’s a joke. There are so many methods to type Chinese in computers and phones. One is pinyin https://en.wikipedia.org/wiki/Pinyin . Every child in China learns pinyin to pronounce Chinese. It’s a little similar to the International Phonetic Alphabet. With 26 Latin letters and choices, anyone can type Chinese.
Add on 15.08.2016.
In case someone may still have doubt, here is an example picture of typing Chinese in the cellphone