The township board of a township may employ an attorney to represent the township in civil matters and in the prosecution of violations of township ordinances. The attorney shall receive the compensation determined by the township board. In prosecution of a violation of a township ordinance, the township attorney shall countersign the certificates of jurors and witnesses.