Transformation optics (TO) has established itself as a powerful and versatile approach to the synthesis of metamaterials with prescribed field-manipulation capabilities, via suitable spatial modulation of their constitutive properties inspired by local distortions of the spatial coordinate reference frame. From the mathematical viewpoint, this approach can be reformulated in the frequency-wavenumber reciprocal phase space so as to engineer nonlocal interactions and spatial dispersion effects, which are becoming increasingly relevant in electrodynamics and optics. Here, we present a general nonlocal-TO framework, based on complex-valued, frequency-dependent wavenumber coordinate transformations, and explore its possible applications to scenarios of interest for dispersion engineering. A key attribute of our approach, similar to conventional TO, is the separation of the conceptual design (based on intuitive geometrical considerations) from the actual metamaterial synthesis (based on a suitable approximation of analytically derived constitutive "blueprints"). To illustrate the capabilities and potential of the proposed approach, we address the engineering (from the conceptual design to the actual synthesis) of multilayered metamaterials exhibiting various exotic dispersion effects, including "one-way" (nonreciprocal) propagation, "frozen-mode" regime, and Dirac-point conical singularities. Our approach may open up new perspectives in the systematic design of metamaterials with broad field-manipulation capabilities as well as complex spatiotemporal dispersion effects, with potential applications to nonreciprocal optics, topological photonics, and "computational metamaterials."