This paper introduces a new approach to localize user devices located in non-line-of-sight (NLOS) areas using a passive, non-reconfigurable, and frequency-selective metasurface called metaprism. By analyzing the spatial filtering of subcarriers in the orthogonal frequency division multiplexing (OFDM) signal transmitted by each user device, the base station can estimate the device's angle of view, distance, and subsequently its position. Two different criteria are proposed for designing the frequency response of the metaprism, depending on whether the users operate in the far-field or near-field region of the metaprism. Simulation results in the millimeter-wave band demonstrate that the system can achieve an accuracy of less than 2 degrees in angle estimation and in the order of decimeters in position estimation.