We study the regularized determinant of the Laplacian as a functional on the space of Mandelstam diagrams (noncompact translation surfaces glued from finite and semi-infinite cylinders). A Mandelstam diagram can be considered as a compact Riemann surface equipped with a conformal flat singular metric |ω| 2 , where ω is a meromorphic one-form with simple poles such that all its periods are pure imaginary and all its residues are real. The main result is an explicit formula for the determinant of the Laplacian in terms of the basic objects on the underlying Riemann surface (the prime form, theta-functions, the canonical meromorphic bidifferential) and the divisor of the meromorphic form ω. As an important intermediate result we prove a decomposition formula of the type of Burghelea-Friedlander-Kappeler for the determinant of the Laplacian for flat surfaces with cylindrical ends and conical singularities.