Involved in the polymorphic O-glycosylation of the serine-rich repeat protein PsrP. Catalyzes the fourth step in glycosylation of PsrP in this bacteria. Can transfer the sugar from UDP-galactose to the terminal sugar moiety of PsrP-GlcNAc-Glc-Gal or of PsrP-GlcNAc-Glc-Glc (using truncated substrates with the PsrP SSR1 domain) (PubMed:28246170). Has hydrolytic activity against UDP-galactose and to a lesser extent against UDP-glucose (PubMed:28246170). Protein modification; protein glycosylation. Encoded in RD10, a pathogenicity island with an atypical GC content that is associated with invasive pneumococcal disease. Pathogenicity islands account for greater than half the genomic diversity observed between isolates (PubMed:11463916, PubMed:16861665). The main function of this island seems to be correct synthesis and export of pneumococcal serine-rich repeat protein PsrP (Probable). In the N-terminal section; belongs to the glycosyltransferase 2 family. In the central section; belongs to the glycosyltransferase 8 family. This gene name has also been given to serine hydroxymethyltransferase (AC Q97R16) in this organism.