But translate.google.cn is not banned on the mainland and Google services work very finely in Hong Kong.
And forcing Mandarin does people's throats is not all bad, in terms of literacy and considering that 70 years ago most of the country was illiterate, no only in language but also in ideas, such as basic western ideas in medical - which led to a huge reduction in infant mortality - the doctors and the literate going to the countryside.
And the across the sea, river, passing swamp, was Hong Kong, which figured out very much earlier and flourished.
But.. translate.google.cn is not blocked in China.
US equivalent to this would be forcing English (which we do) while jailing anyone who teaches Creole (which we don’t).
Mandarin being the primary language of education doesn't mean that Cantonese is prohibited; it's just not mandatory, so most native Cantonese speakers aren't going to get a formal education in it unless they specifically seek it out.