Involved in the polymorphic O-glycosylation of the serine-rich repeat protein PsrP. Catalyzes the third step in glycosylation of PsrP in this bacteria. Transfers galactose from UDP-galactose to the terminal glucose moiety of already-glycosylated PsrP (using the short substrate PsrP-GlcNAc-Glc). Has a very marked preference for PsrP substrate that has already been modified by GlcNAc and glucose. Has hydrolytic activity against UDP-galactose but none against UDP-glucose. Also 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-Glc and of PsrP-GlcNAc-Glc-Gal. Protein modification; protein glycosylation. Has 2 domains, the N-terminal GT8 domain that binds UDP and Mn(2+) and a C-terminal domain that assumes a Rossmann-like fold. The GT8 domain has UDP-galactose hydrolysis activity but no galactose transferase activity (PubMed:28246170). The C-terminal domain probably binds the partially glycosylated protein acceptor in a continuous, surface-exposed groove that can possibly bind proteins with varying degrees of glycosylation (Probable). 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 8 family.