International audiencePart I of this paper introduced a Lagrangian variational formulation for nonequilibrium thermodynamics of discrete systems. This variational formulation extends Hamilton's principle to allow the inclusion of irreversible processes in the dynamics. The irreversibility is encoded into a nonlinear nonholonomic constraint given by the expression of entropy production associated to all the irreversible processes involved. In Part II, we develop this formulation for the case of continuum systems by extending the setting of Part I to infinite dimensional nonholonomic Lagrangian systems. The variational formulation is naturally expressed in the material representation, while its spatial version is obtained via a nonholonomic L...