Hey!! I'm sorry I missed your comments!
Well, MAG is WIZARD in Catalan, and that's what the illustrator originally wrote on Rincewind's hat. But then fans pointed out that it should be misspelled (as WIZZARD has an extra Z) so she added an extra G to MAG.