The Boston Public Library’s board of trustees approved a budget yesterday that would keep all 26 branches open, but shutter the central location in Copley Square on Sundays. Trustees voted 4 to 2 to accept the $39.34 million spending plan. It must still be approved by Mayor Thomas M. Menino and the City Council. Changes could also come from the state, which funds the library and has not finalized its own budget. The spending plan would avert layoffs and keep doors open at four branches that had been slated to close last year, a proposal the Menino administration abandoned in the face of neighborhood opposition.